aboutsummaryrefslogtreecommitdiff
path: root/testdata/Apply_test.txt
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/Apply_test.txt')
-rw-r--r--testdata/Apply_test.txt68
1 files changed, 53 insertions, 15 deletions
diff --git a/testdata/Apply_test.txt b/testdata/Apply_test.txt
index 712c2bc..43360b4 100644
--- a/testdata/Apply_test.txt
+++ b/testdata/Apply_test.txt
@@ -4,13 +4,48 @@
// REUSE-IgnoreStart
>>> spdxconv.cfg
-# SPDX-License-Identifier: BSD-3-Clause
+# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
[default]
license_identifier = GPL-3.0-only
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 = "^.*\\.(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
@@ -19,23 +54,26 @@ delete_line_pattern = "^(//+|#+)\\s+license that(.*)$"
[match-copyright]
pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<contact>.*)>.*$"
->>> without_spdx_license_id.txt
+>>> without_spdx_license_id.go
1
2
3
-<<< without_spdx_license_id.txt
+<<< without_spdx_license_id.go
+// SPDX-License-Identifier: GPL-3.0-only
+// SPDX-FileCopyrightText: M. Shulhan <ms@kilabit.info>
+
1
2
3
->>> with_spdx_at_bottom.txt
+>>> with_spdx_at_bottom.go
1
2
3
// SPDX-License-Identifier: GPL-3.0-only
-<<< with_spdx_at_bottom.txt
+<<< with_spdx_at_bottom.go
// SPDX-License-Identifier: GPL-3.0-only
// SPDX-FileCopyrightText: M. Shulhan <ms@kilabit.info>
@@ -43,13 +81,13 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
->>> with_spdx_license_id_only.txt
+>>> with_spdx_license_id_only.go
// SPDX-License-Identifier: GPL-3.0-only
1
2
3
-<<< with_spdx_license_id_only.txt
+<<< with_spdx_license_id_only.go
// SPDX-License-Identifier: GPL-3.0-only
// SPDX-FileCopyrightText: M. Shulhan <ms@kilabit.info>
@@ -57,7 +95,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
->>> with_spdx.txt
+>>> with_spdx.go
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2018 Shulhan <ms@kilabit.info>
@@ -65,7 +103,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
-<<< with_spdx.txt
+<<< with_spdx.go
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2018 Shulhan <ms@kilabit.info>
@@ -73,7 +111,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
->>> with_spdx_no_order.txt
+>>> with_spdx_no_order.go
// SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
// SPDX-License-Identifier: BSD-3-Clause
@@ -81,7 +119,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
-<<< with_spdx_no_order.txt
+<<< with_spdx_no_order.go
// SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
// SPDX-License-Identifier: BSD-3-Clause
@@ -89,7 +127,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
->>> with_match_license.txt
+>>> with_match_license.go
// Copyright 2018, Shulhan <ms@kilabit.info>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -98,7 +136,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
-<<< with_match_license.txt
+<<< with_match_license.go
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2018 Shulhan <ms@kilabit.info>
@@ -106,7 +144,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
2
3
->>> with_match_license_bottom.txt
+>>> with_match_license_bottom.go
1
2
3
@@ -115,7 +153,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-<<< with_match_license_bottom.txt
+<<< with_match_license_bottom.go
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2018 Shulhan <ms@kilabit.info>