aboutsummaryrefslogtreecommitdiff
path: root/spdxconv_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'spdxconv_test.go')
-rw-r--r--spdxconv_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/spdxconv_test.go b/spdxconv_test.go
index 40bcc16..d2c7494 100644
--- a/spdxconv_test.go
+++ b/spdxconv_test.go
@@ -4,6 +4,7 @@
package spdxconv
import (
+ "regexp"
"testing"
"git.sr.ht/~shulhan/pakakeh.go/lib/git"
@@ -71,7 +72,7 @@ func TestSPDXConv_loadConfig(t *testing.T) {
LicenseIdentifier: `GPL-3.0-only`,
FileCopyrightText: `Author <author@email.info>`,
MaxLineMatch: 10,
- MatchLicense: []configMatchLicense{{
+ MatchLicense: []*configMatchLicense{{
Pattern: `^(//+|#+)*\s+(.*)governed by a BSD-style(.*)$`,
LicenseIdentifier: `BSD-3-Clause`,
DeleteLinePattern: []string{
@@ -79,6 +80,11 @@ func TestSPDXConv_loadConfig(t *testing.T) {
`^(//+|#+)*\s+license that(.*)$`,
},
DeleteMatch: true,
+ rePattern: regexp.MustCompile(`^(//+|#+)*\s+(.*)governed by a BSD-style(.*)$`),
+ reDeleteLine: []*regexp.Regexp{
+ regexp.MustCompile(`^(//+|#+)*\s*$`),
+ regexp.MustCompile(`^(//+|#+)*\s+license that(.*)$`),
+ },
}},
},
}}