Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for default format...
details: https://anonhg.NetBSD.org/src/rev/27687c70d6c6
branches: trunk
changeset: 945403:27687c70d6c6
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Oct 29 19:01:10 2020 +0000
description:
make(1): add test for default format of the :localtime modifier
diffstat:
usr.bin/make/unit-tests/varmod-localtime.mk | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r af0f50b8ad0d -r 27687c70d6c6 usr.bin/make/unit-tests/varmod-localtime.mk
--- a/usr.bin/make/unit-tests/varmod-localtime.mk Thu Oct 29 18:59:43 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-localtime.mk Thu Oct 29 19:01:10 2020 +0000
@@ -1,8 +1,16 @@
-# $NetBSD: varmod-localtime.mk,v 1.3 2020/08/23 15:13:21 rillig Exp $
+# $NetBSD: varmod-localtime.mk,v 1.4 2020/10/29 19:01:10 rillig Exp $
#
# Tests for the :localtime variable modifier, which returns the given time,
# formatted as a local timestamp.
+# Test for the default time format, %c. Since the time always varies, it's
+# only possible to check for the general format here. The names of the
+# month and weekday are always in English, independent from the locale.
+# Example: Thu Oct 29 18:56:41 2020
+.if ${:U:localtime:tW:M??? ??? ?? ??\:??\:?? ????} == ""
+. error
+.endif
+
all:
@echo ${%Y:L:localtim=1593536400} # modifier name too short
@echo ${%Y:L:localtime=1593536400} # 2020-07-01T00:00:00Z
Home |
Main Index |
Thread Index |
Old Index