Module Name:    src
Committed By:   rillig
Date:           Sat Oct 31 19:55:26 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: varmod-gmtime.exp varmod-gmtime.mk

Log Message:
make(1): add test for :gmtime with space before the number of seconds


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/varmod-gmtime.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/varmod-gmtime.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/varmod-gmtime.exp
diff -u src/usr.bin/make/unit-tests/varmod-gmtime.exp:1.3 src/usr.bin/make/unit-tests/varmod-gmtime.exp:1.4
--- src/usr.bin/make/unit-tests/varmod-gmtime.exp:1.3	Sat Oct 31 19:48:23 2020
+++ src/usr.bin/make/unit-tests/varmod-gmtime.exp	Sat Oct 31 19:55:26 2020
@@ -8,6 +8,7 @@ make: Unknown modifier '1'
 
 parse-errors:
 : -1 becomes Wed Dec 31 23:59:59 1969.
+: space 1 becomes Thu Jan  1 00:00:01 1970.
 : 0 becomes ok.
 : 1 becomes Thu Jan  1 00:00:01 1970.
 : INT32_MAX becomes Tue Jan 19 03:14:07 2038.

Index: src/usr.bin/make/unit-tests/varmod-gmtime.mk
diff -u src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.4 src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.5
--- src/usr.bin/make/unit-tests/varmod-gmtime.mk:1.4	Sat Oct 31 19:48:23 2020
+++ src/usr.bin/make/unit-tests/varmod-gmtime.mk	Sat Oct 31 19:55:26 2020
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-gmtime.mk,v 1.4 2020/10/31 19:48:23 rillig Exp $
+# $NetBSD: varmod-gmtime.mk,v 1.5 2020/10/31 19:55:26 rillig Exp $
 #
 # Tests for the :gmtime variable modifier, which formats a timestamp
 # using strftime(3).
@@ -49,6 +49,10 @@ parse-errors:
 	# make.
 	: -1 becomes ${:L:gmtime=-1}.
 
+	# Spaces are allowed, not because it would make sense but just as
+	# a side-effect from using strtoul.
+	: space 1 becomes ${:L:gmtime= 1}.
+
 	# 0 means now; to get consistent test results, the actual value has
 	# to be normalized.
 	: 0 becomes ${:L:gmtime=0:C,^... ... .. ..:..:.. 20..$,ok,W}.

Reply via email to