summaryrefslogtreecommitdiffstats
path: root/contrib/awk/test/strftlng.awk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk/test/strftlng.awk')
-rw-r--r--contrib/awk/test/strftlng.awk11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/awk/test/strftlng.awk b/contrib/awk/test/strftlng.awk
new file mode 100644
index 0000000..0ef8195
--- /dev/null
+++ b/contrib/awk/test/strftlng.awk
@@ -0,0 +1,11 @@
+# test file from Paul Eggert, eggert@twinsun.com
+# modified for portability (%c doesn't cut it)
+
+BEGIN {
+ BUFSIZ = 1024
+ simpleformat = format = "%m/%d/%y %H:%M:%S\n"
+ clen = length(strftime(format, 0))
+ for (i = 1; i < BUFSIZ / clen + 1; i++)
+ format = format simpleformat
+ printf "%s", strftime(format, 0)
+}
OpenPOWER on IntegriCloud