aboutsummaryrefslogtreecommitdiff
path: root/file_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-14 16:07:16 +0700
committerShulhan <ms@kilabit.info>2026-01-14 17:00:11 +0700
commit5321f51af46535f31c79d22c70350035b6e0d173 (patch)
treec08c3285ab062491b7fec210caa7c07d03638ab6 /file_test.go
parenta6f72c549c43ae9d2d74946769221cb3431e9458 (diff)
downloadspdxconv-5321f51af46535f31c79d22c70350035b6e0d173.tar.xz
match_file_comment: do not add space on prefix and suffix
The space should be added only when generating the SPDX lines. In the spdxconv.report, it should print the prefix and suffix as in match-file-comment.
Diffstat (limited to 'file_test.go')
-rw-r--r--file_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/file_test.go b/file_test.go
index 20110ca..878789c 100644
--- a/file_test.go
+++ b/file_test.go
@@ -26,7 +26,7 @@ func TestFile_detectComment(t *testing.T) {
topLines: [][]byte{
[]byte(`#!/bin/sh`),
},
- commentPrefix: `# `,
+ commentPrefix: `#`,
hasSheBang: true,
},
}, {
@@ -35,7 +35,7 @@ func TestFile_detectComment(t *testing.T) {
},
expFile: file{
path: `test.rb`,
- commentPrefix: `# `,
+ commentPrefix: `#`,
},
}, {
f: file{
@@ -43,7 +43,7 @@ func TestFile_detectComment(t *testing.T) {
},
expFile: file{
path: `test.c`,
- commentPrefix: `// `,
+ commentPrefix: `//`,
},
}, {
f: file{
@@ -51,7 +51,7 @@ func TestFile_detectComment(t *testing.T) {
},
expFile: file{
path: `test.go`,
- commentPrefix: `// `,
+ commentPrefix: `//`,
},
}, {
f: file{
@@ -59,8 +59,8 @@ func TestFile_detectComment(t *testing.T) {
},
expFile: file{
path: `test.html`,
- commentPrefix: `<!-- `,
- commentSuffix: ` -->`,
+ commentPrefix: `<!--`,
+ commentSuffix: `-->`,
},
}}
cfg := &config{}