aboutsummaryrefslogtreecommitdiffstats
path: root/test/lc_num1.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/lc_num1.awk')
-rw-r--r--test/lc_num1.awk17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/lc_num1.awk b/test/lc_num1.awk
index c982a146..c9b98ecf 100644
--- a/test/lc_num1.awk
+++ b/test/lc_num1.awk
@@ -1,4 +1,19 @@
# Bug reported by Ulrich Drepper.
+# BEGIN {
+# printf("%'d %d\n", 1000000, 1000000)
+# }
+
+# April 2010:
+# This needs to be a smarter test so that systems without the %'d flag
+# don't generate a needless failure.
+
BEGIN {
- printf("%'d %d\n", 1000000, 1000000)
+ s = sprintf("%'d", 1234)
+ if (s == "1,234" || s == "1234")
+ print "ok, or at least the quote flag isn't supported"
+ else {
+ command = "od -c"
+ print("fail:", s) | command
+ close(command)
+ }
}