Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f3c88bed6c742982992ac4edc8b294c3445a157d

>---------------------------------------------------------------

commit f3c88bed6c742982992ac4edc8b294c3445a157d
Author: Ian Lynagh <[email protected]>
Date:   Thu Mar 1 14:03:31 2012 +0000

    Add a readInteger001 test

>---------------------------------------------------------------

 tests/all.T                 |    1 +
 tests/readInteger001.hs     |    7 +++++++
 tests/readInteger001.stdout |    2 ++
 3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/all.T b/tests/all.T
index 7addfd1..582a542 100644
--- a/tests/all.T
+++ b/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/tests/readInteger001.hs b/tests/readInteger001.hs
new file mode 100644
index 0000000..10391e4
--- /dev/null
+++ b/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/tests/readInteger001.stdout b/tests/readInteger001.stdout
new file mode 100644
index 0000000..c71bf50
--- /dev/null
+++ b/tests/readInteger001.stdout
@@ -0,0 +1,2 @@
+[]
+[]



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to