From 32e4ea9ddf0c2d37f00fa81a4fb1dfe67420b8fe Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 15 Jan 2026 20:10:24 +0700 Subject: all: add test for Scan on new file without git history New file without git history should use the year from configuration. --- testdata/Scan_test.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'testdata/Scan_test.txt') diff --git a/testdata/Scan_test.txt b/testdata/Scan_test.txt index dca80da..7d09da5 100644 --- a/testdata/Scan_test.txt +++ b/testdata/Scan_test.txt @@ -3,6 +3,9 @@ Test spdxconv.Scan function. +>>> scan/new_file.adoc +New file without git history should use the year from configuration. + >>> scan/spdxconv.report // Reset the report. @@ -17,6 +20,7 @@ Test spdxconv.Scan function. // Makefile,default,0,2026,default,0,#, go.mod,default,0,2026,default,0,//, +new_file.adoc,default,0,2025,default,0,//, no_copyright_year.md,match,2,2026,default,0, po/included.go,match,1,2026,match,0,//, test.go,match,1,2022,match,0,//, @@ -40,6 +44,31 @@ po/test.po,,0,,,0,, po/test.pot,,0,,,0,, with_spdx.go,exist,0,,exist,1,//, +>>> scan_no_scm/spdxconv.report +// Reset the report. + +<<< scan_no_scm/spdxconv.report +// SPDX-License-Identifier: CC0-1.0 +// SPDX-FileCopyrightText: 2026 M. Shulhan + +//spdxconv:version:v1 +//spdxconv:header:path,license_id,idx_license_id,year,copyright_id,idx_copyright_id +// +//spdxconv:regular +// +// +//spdxconv:binary +// +// +//spdxconv:unknown +// +test.go,,0,,,0,, +test.html,,0,,,0,, +test.sh,,0,,,0,, +// +//spdxconv:done +// + >>> Scan_noConfigAndReport/spdxconv.report // Reset the report. -- cgit v1.3