summaryrefslogtreecommitdiffstats
path: root/contrib/awk/test/strftime.awk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk/test/strftime.awk')
-rw-r--r--contrib/awk/test/strftime.awk15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/awk/test/strftime.awk b/contrib/awk/test/strftime.awk
new file mode 100644
index 0000000..8c1f401
--- /dev/null
+++ b/contrib/awk/test/strftime.awk
@@ -0,0 +1,15 @@
+# strftime.awk ; test the strftime code
+#
+# input is the output of `date', see Makefile.in
+#
+# The mucking about with $0 and $N is to avoid problems
+# on cygwin, where the timezone field is empty and there
+# are two consecutive blanks.
+
+{
+ $3 = sprintf("%02d", $3 + 0)
+ print > "strftime.ok"
+ $0 = strftime()
+ $NF = $NF
+ print > OUTPUT
+}
OpenPOWER on IntegriCloud