summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/Lex/lexNum.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/lib/Lex/lexNum.hs')
-rw-r--r--testsuite/tests/lib/Lex/lexNum.hs28
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/tests/lib/Lex/lexNum.hs b/testsuite/tests/lib/Lex/lexNum.hs
new file mode 100644
index 0000000000..fb63034b52
--- /dev/null
+++ b/testsuite/tests/lib/Lex/lexNum.hs
@@ -0,0 +1,28 @@
+module Main where
+
+testStrings
+ = [ "0x3y",
+ "0X3abx",
+ "0o39y",
+ "0O334z",
+
+ "NaN",
+ "Infinity",
+
+ "34yy",
+ "34.4x",
+ "034.4x",
+ "31.45e-6y",
+ "49.2v",
+ "049.2v",
+ "35e-3x",
+ "035e-3x",
+ "35e+3y",
+ "83.3e-22",
+ "083.3e-22"
+ ]
+
+main = mapM test testStrings
+
+test s = print (lex s)
+