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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/290771af520d1e9f1020e5e065a3392bec54eb1d

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

commit 290771af520d1e9f1020e5e065a3392bec54eb1d
Author: Ian Lynagh <[email protected]>
Date:   Sat Nov 19 23:23:29 2011 +0000

    Move Data.List tests to base/tests

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

 tests/all.T                     |    2 ++
 tests/genericNegative001.hs     |    8 ++++++++
 tests/genericNegative001.stdout |    3 +++
 tests/take001.hs                |    5 +++++
 tests/take001.stdout            |    1 +
 5 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/tests/all.T b/tests/all.T
index 1f1ba2a..dc3483d 100644
--- a/tests/all.T
+++ b/tests/all.T
@@ -20,4 +20,6 @@ test('data-fixed-show-read', normal, compile_and_run, [''])
 test('showDouble', normal, compile_and_run, [''])
 test('hash001', normal, compile_and_run, [''])
 test('lexNum', normal, compile_and_run, [''])
+test('take001', extra_run_opts('1'), compile_and_run, [''])
+test('genericNegative001', extra_run_opts('-1'), compile_and_run, [''])
 
diff --git a/tests/genericNegative001.hs b/tests/genericNegative001.hs
new file mode 100644
index 0000000..f59a42f
--- /dev/null
+++ b/tests/genericNegative001.hs
@@ -0,0 +1,8 @@
+-- Test for http://hackage.haskell.org/trac/ghc/ticket/2533
+import System.Environment
+import Data.List
+main = do 
+ (n:_) <- getArgs
+ print (genericTake (read n) "none taken")
+ print (genericDrop (read n) "none dropped")
+ print (genericSplitAt (read n) "none split")
diff --git a/tests/genericNegative001.stdout b/tests/genericNegative001.stdout
new file mode 100644
index 0000000..b8a0907
--- /dev/null
+++ b/tests/genericNegative001.stdout
@@ -0,0 +1,3 @@
+""
+"none dropped"
+("","none split")
diff --git a/tests/take001.hs b/tests/take001.hs
new file mode 100644
index 0000000..a7a5314
--- /dev/null
+++ b/tests/take001.hs
@@ -0,0 +1,5 @@
+-- Test for bug #1219, F/B rule for take was too strict
+import System.Environment
+main = do 
+ (n:_) <- getArgs
+ print (map (const 'x') (take (read n) (undefined:undefined)))
diff --git a/tests/take001.stdout b/tests/take001.stdout
new file mode 100644
index 0000000..92232f6
--- /dev/null
+++ b/tests/take001.stdout
@@ -0,0 +1 @@
+"x"



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

Reply via email to