1 // 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.
14 func TestToolsCopyright(t *testing.T) {
15 cwd, err := os.Getwd()
19 tools := filepath.Dir(cwd)
20 if !strings.HasSuffix(filepath.Base(tools), "tools") {
21 t.Fatalf("current working directory is %s, expected tools", tools)
23 files, err := checkCopyright(tools)
28 t.Errorf("The following files are missing copyright notices:\n%s", strings.Join(files, "\n"))