summaryrefslogtreecommitdiff
path: root/test/strftlng.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/strftlng.awk')
-rw-r--r--test/strftlng.awk11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/strftlng.awk b/test/strftlng.awk
new file mode 100644
index 0000000..0ef8195
--- /dev/null
+++ b/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)
+}