Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
1044bd1a
Commit
1044bd1a
authored
Feb 14, 2007
by
Simon Marlow
Browse files
add test for bug
#1010
parent
b99a8229
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/rts/all.T
View file @
1044bd1a
...
...
@@ -5,3 +5,8 @@ test('testblockalloc', compose(c_src,
compose
(
only_ways
(['
threaded1
']),
extra_run_opts
('
+RTS -I0
'))),
compile_and_run
,
[''])
# See bug #101, test requires +RTS -c (or equivalently +RTS -M<something>)
# only GHCi triggers the bug, but we run the test all ways for completeness.
test
('
bug1010
',
normal
,
compile_and_run
,
['
+RTS -c -RTS
'])
testsuite/tests/ghc-regress/rts/bug1010.hs
0 → 100644
View file @
1044bd1a
module
Main
where
break2
p
(
x
:
xs
)
=
if
p
x
then
(
[]
,
x
:
xs
)
else
let
(
b1
,
b2
)
=
break2
p
xs
in
(
x
:
b1
,
b2
)
break2
p
[]
=
(
[]
,
[]
)
surprise
xs
=
b1
++
"
\n
surprise "
++
b2
where
(
b1
,
b2
)
=
break2
(
==
'
\n
'
)
xs
test
n
=
length
$
surprise
$
[
head
(
show
i
)
|
i
<-
[
1
..
n
]
]
++
"
\n
the end"
main
=
print
$
test
10000
testsuite/tests/ghc-regress/rts/bug1010.stdout
0 → 100644
View file @
1044bd1a
10020
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment