summaryrefslogtreecommitdiff
path: root/libraries/base
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-03-01 14:03:31 +0000
committerIan Lynagh <igloo@earth.li>2012-03-01 14:03:31 +0000
commit81b6141a3f4101ed5abc1f65d53823edc2b7373d (patch)
tree036ac7a028fbeb0abc7e43a22abe2d09af8d58d8 /libraries/base
parent198c93e7d1952be3835fb3da787378f8fb968f76 (diff)
downloadhaskell-81b6141a3f4101ed5abc1f65d53823edc2b7373d.tar.gz
Add a readInteger001 test
Diffstat (limited to 'libraries/base')
-rw-r--r--libraries/base/tests/all.T1
-rw-r--r--libraries/base/tests/readInteger001.hs7
-rw-r--r--libraries/base/tests/readInteger001.stdout2
3 files changed, 10 insertions, 0 deletions
diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T
index 7addfd18db..582a54261b 100644
--- a/libraries/base/tests/all.T
+++ b/libraries/base/tests/all.T
@@ -19,6 +19,7 @@ test('unicode002',
test('data-fixed-show-read', normal, compile_and_run, [''])
test('showDouble', normal, compile_and_run, [''])
test('readDouble001', normal, compile_and_run, [''])
+test('readInteger001', normal, compile_and_run, [''])
test('hash001', normal, compile_and_run, [''])
test('lex001', normal, compile_and_run, [''])
test('take001', extra_run_opts('1'), compile_and_run, [''])
diff --git a/libraries/base/tests/readInteger001.hs b/libraries/base/tests/readInteger001.hs
new file mode 100644
index 0000000000..10391e419a
--- /dev/null
+++ b/libraries/base/tests/readInteger001.hs
@@ -0,0 +1,7 @@
+
+main :: IO ()
+main = do f "100e12"
+ f "00123.456"
+
+f :: String -> IO ()
+f str = print (reads str :: [(Integer, String)])
diff --git a/libraries/base/tests/readInteger001.stdout b/libraries/base/tests/readInteger001.stdout
new file mode 100644
index 0000000000..c71bf50e82
--- /dev/null
+++ b/libraries/base/tests/readInteger001.stdout
@@ -0,0 +1,2 @@
+[]
+[]