diff options
Diffstat (limited to 'spdxconv_test.go')
| -rw-r--r-- | spdxconv_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spdxconv_test.go b/spdxconv_test.go index 194276e..77929e8 100644 --- a/spdxconv_test.go +++ b/spdxconv_test.go @@ -64,14 +64,14 @@ func TestInit(t *testing.T) { Pattern: `^.*\.(apk|app|bz2|csv|doc|docx|exe|gif|gz|jpeg|jpg|json|pdf|png|ppt|pptx|svg|svgz|tar|tgz|xls|xlsx|zip)$`, }}, MatchLicense: []*matchLicense{{ - Pattern: `^(//+|#+)\s+(.*)governed by a BSD-style(.*)$`, + Pattern: `^(//+|#+|/\*+|<!--+)?\s*(.*)governed by a BSD-style(.*)$`, LicenseIdentifier: `BSD-3-Clause`, DeleteLinePattern: []string{ - `^(//+|#+)\s+license that(.*)$`, + `^(//+|#+|/\*+|<!--+)?\s*license that can(.*)$`, }, }}, MatchCopyright: []*matchCopyright{{ - Pattern: `^(//+|#+)\s+Copyright\s+(?<year>\d{4}),?\s+(?<author>.*)\s+<*(?<contact>.*)>.*$`, + Pattern: `^(//+|#+|/\*+|<!--+)?\s*Copyright\s+(?<year>\d{4}),?\s+(?<author>.*)\s+<(?<contact>.*)>.*$`, }}, } for _, mfc := range exp.MatchFileComment { @@ -110,9 +110,9 @@ func TestScan(t *testing.T) { //spdxconv:version:v1 //spdxconv:header:path,license_id,idx_license_id,year,copyright_id,idx_copyright_id //spdxconv:regular -test.go,match,1,unknown,match,0,// , -test.html,default,0,unknown,default,0,<!-- ," -->" -test.sh,match,1,unknown,match,0,# , +test.go,match,1,2022,match,0,// , +test.html,match,2,2022,match,1,<!-- ," -->" +test.sh,match,1,2022,match,0,# , //spdxconv:binary //spdxconv:unknown` |
