diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-07-15 20:58:01 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-08-07 10:19:21 -0400 |
commit | f1d0e49f8a9a9175c83442430fac76ae225e52ae (patch) | |
tree | 40a66b0f757a6c81fc989ad993468fc032f24836 /libraries | |
parent | 8e2fe57528bacf91e19857d818515b81fadbed58 (diff) | |
download | haskell-f1d0e49f8a9a9175c83442430fac76ae225e52ae.tar.gz |
testsuite: Add tests for #16943
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/tests/T16943a.hs | 6 | ||||
-rw-r--r-- | libraries/base/tests/T16943a.stdout | 2 | ||||
-rw-r--r-- | libraries/base/tests/T16943b.hs | 11 | ||||
-rw-r--r-- | libraries/base/tests/T16943b.stdout | 2 | ||||
-rw-r--r-- | libraries/base/tests/all.T | 2 |
5 files changed, 23 insertions, 0 deletions
diff --git a/libraries/base/tests/T16943a.hs b/libraries/base/tests/T16943a.hs new file mode 100644 index 0000000000..7941e29acc --- /dev/null +++ b/libraries/base/tests/T16943a.hs @@ -0,0 +1,6 @@ +module Main(main) where + +scoreWeek = scanr (:) [] $ repeat True + +main = seq scoreWeek (putStrLn "good") + diff --git a/libraries/base/tests/T16943a.stdout b/libraries/base/tests/T16943a.stdout new file mode 100644 index 0000000000..287e33e2a8 --- /dev/null +++ b/libraries/base/tests/T16943a.stdout @@ -0,0 +1,2 @@ +good + diff --git a/libraries/base/tests/T16943b.hs b/libraries/base/tests/T16943b.hs new file mode 100644 index 0000000000..7e96eaba60 --- /dev/null +++ b/libraries/base/tests/T16943b.hs @@ -0,0 +1,11 @@ +module Main(main) where + +scoreWeek :: [Int] -> [[Int]] +scoreWeek xs = + take 168 + $ scanr (:) [] + -- $ take (3*168) + $ cycle xs + +main = print $ length $ scoreWeek [1,2..168] + diff --git a/libraries/base/tests/T16943b.stdout b/libraries/base/tests/T16943b.stdout new file mode 100644 index 0000000000..4bbe7249a2 --- /dev/null +++ b/libraries/base/tests/T16943b.stdout @@ -0,0 +1,2 @@ +168 + diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T index 03462c7e2c..0b45c9aff2 100644 --- a/libraries/base/tests/all.T +++ b/libraries/base/tests/all.T @@ -251,3 +251,5 @@ test('T13896', normal, compile_and_run, ['']) test('T13167', fragile_for(16536, ['threaded2']), compile_and_run, ['']) test('T15349', [exit_code(1), expect_broken_for(15349, ['ghci'])], compile_and_run, ['']) test('T16111', exit_code(1), compile_and_run, ['']) +test('T16943a', normal, compile_and_run, ['']) +test('T16943b', normal, compile_and_run, ['']) |