aboutsummaryrefslogtreecommitdiff
path: root/testdata/Apply_fromReport_test.txt
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-14 04:40:19 +0700
committerShulhan <ms@kilabit.info>2026-01-14 04:40:19 +0700
commitb37a4cd18827d6a8dafe2729ba72a8e13e8fbb8c (patch)
treefec0411825230780e08a8cf6619b683e46898e01 /testdata/Apply_fromReport_test.txt
parent9801b1cf64dbf8340fe532542bae186a6bb507dd (diff)
downloadspdxconv-b37a4cd18827d6a8dafe2729ba72a8e13e8fbb8c.tar.xz
all: fix error when scanning and apply empty file
Diffstat (limited to 'testdata/Apply_fromReport_test.txt')
-rw-r--r--testdata/Apply_fromReport_test.txt76
1 files changed, 76 insertions, 0 deletions
diff --git a/testdata/Apply_fromReport_test.txt b/testdata/Apply_fromReport_test.txt
new file mode 100644
index 0000000..33d4e85
--- /dev/null
+++ b/testdata/Apply_fromReport_test.txt
@@ -0,0 +1,76 @@
+// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
+
+// REUSE-IgnoreStart
+
+>>> spdxconv.cfg
+# SPDX-License-Identifier: CC0-1.0
+# SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
+
+[default]
+license_identifier = GPL-3.0-only
+copyright_year = 2026
+file_copyright_text = M. Shulhan <ms@kilabit.info>
+
+[match-file-comment]
+pattern = "^.*\\.(adoc|asciidoc|c|cc|cpp|cs|dart|go|h|hh|hpp|java|js|jsx|jsonc|kt|kts|php|rs|sass|scss|swift|ts|tsx)$"
+prefix = "//"
+
+[match-file-comment]
+pattern = "^.*\\.(aff|bash|csh|dockerfile|env|gitignore|hcl|ipynb|make|pl|pm|py|ps1|rb|sh|tf|yaml|yml|zsh)$"
+prefix = "#"
+
+[match-file-comment]
+pattern = "^.*\\.(css)$"
+prefix = "/*"
+suffix = "*/"
+
+[match-file-comment]
+pattern = "^.*\\.(fxml|htm|html|html5|kml|markdown|md|xml)$"
+prefix = "<!--"
+suffix = "-->"
+
+[match-file-comment]
+pattern = "^.*\\.(lua|sql)$"
+prefix = "--"
+
+[match-file-comment]
+pattern = "^.*\\.(rst)$"
+prefix = ".."
+
+[match-file-comment]
+pattern = "^.*\\.(tex)$"
+prefix = "%"
+
+# File name that match with this pattern will have the ".license" file
+# created.
+[match-file-comment]
+pattern = "^.*\\.(apk|app|bz2|csv|doc|docx|exe|gif|gz|jpeg|jpg|json|pdf|png|ppt|pptx|svg|svgz|tar|tgz|xls|xlsx|zip)$"
+
+[match-license]
+pattern = "^(//+|#+|/\\*+|<!--+|--+)?\\s*(.*)governed by a BSD-style(.*)$"
+license_identifier = BSD-3-Clause
+delete_line_before = "^(//+|#+|/\\*+|<!--+|--+)$"
+delete_line_after = "^(//+|#+|/\\*+|<!--+|--+)?\\s*license that can(.*)$"
+delete_line_after = "^(//+|#+|\\*+/|--+>|--+)$"
+
+[match-copyright]
+pattern = "^(//+|#+|/\\*+|<!--+|--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$"
+delete_line_before = "^(//+|#+|/\\*+|<!--+|--+)$"
+delete_line_after = "^(//+|#+|\\*+/|--+>|--+)$"
+
+>>> spdxconv.report
+
+//spdxconv:regular
+empty.html,default,0,2026,default,0,<!-- ," -->"
+//spdxconv:binary
+//spdxconv:unknown
+
+>>> empty.html
+
+<<< empty.html
+<!-- SPDX-License-Identifier: GPL-3.0-only -->
+<!-- SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info> -->
+
+<<< END
+// REUSE-IgnoreEnd