aboutsummaryrefslogtreecommitdiffstats
path: root/test/hex.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/hex.awk')
-rw-r--r--test/hex.awk22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/hex.awk b/test/hex.awk
new file mode 100644
index 00000000..f9d1ad58
--- /dev/null
+++ b/test/hex.awk
@@ -0,0 +1,22 @@
+# Test program from Paul Eggert, eggert@cs.ucla.edu, Jan. 14, 2005
+
+BEGIN {
+ e = "1(e)"
+ ex = "3e2(ex)"
+ x = "6e5(x)"
+
+ print e+0, x+0
+ print 0x
+ print 0e+x
+ print 0ex
+ print 010e2
+ print 0e9.3
+}
+
+# Expected results:
+# 1 600000
+# 06e5(x)
+# 0600001
+# 03e2(ex)
+# 1000
+# 00.3