diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-14 16:07:16 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-14 17:00:11 +0700 |
| commit | 5321f51af46535f31c79d22c70350035b6e0d173 (patch) | |
| tree | c08c3285ab062491b7fec210caa7c07d03638ab6 /file_test.go | |
| parent | a6f72c549c43ae9d2d74946769221cb3431e9458 (diff) | |
| download | spdxconv-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.go | 12 |
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{} |
