blob: 947fb10c1d12fbad2a088e25033598f79d37bcda [file] [log] [blame]
Rebecca Stamblerd33bae42021-01-07 22:36:26 -05001// Copyright 2020 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Rebecca Stamblerd33bae42021-01-07 22:36:26 -05005package copyright
6
7import (
Rebecca Stamblerd33bae42021-01-07 22:36:26 -05008 "strings"
9 "testing"
10)
11
12func TestToolsCopyright(t *testing.T) {
Heschi Kreinick9e0a7b12023-04-27 10:15:48 -040013 files, err := checkCopyright("..")
Rebecca Stamblerd33bae42021-01-07 22:36:26 -050014 if err != nil {
15 t.Fatal(err)
16 }
17 if len(files) > 0 {
18 t.Errorf("The following files are missing copyright notices:\n%s", strings.Join(files, "\n"))
19 }
20}