tests: add unit tests for header and template funcs
Much of this is being tested with the existing file-based tests in testdata/*, but this moves us toward a much more targetted and simpler test structure.
This commit is contained in:
2
main.go
2
main.go
@@ -334,5 +334,5 @@ func hasLicense(b []byte) bool {
|
||||
}
|
||||
return bytes.Contains(bytes.ToLower(b[:n]), []byte("copyright")) ||
|
||||
bytes.Contains(bytes.ToLower(b[:n]), []byte("mozilla public")) ||
|
||||
bytes.Contains(bytes.ToLower(b[:n]), []byte("SPDX-License-Identifier"))
|
||||
bytes.Contains(bytes.ToLower(b[:n]), []byte("spdx-license-identifier"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user