Skip to content
GitLab
Menu
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
168c6b2a
Commit
168c6b2a
authored
Feb 26, 2007
by
Ian Lynagh
Browse files
Add testcase from trac
#1171
as cg059
parent
bbdacb83
Changes
4
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/codeGen/should_run/all.T
View file @
168c6b2a
...
...
@@ -60,3 +60,4 @@ test('cg057', composes([expect_broken(948),
compile_and_run
,
[''])
test
('
cg058
',
normal
,
compile_and_run
,
[''])
test
('
cg059
',
exit_code
(
1
),
compile_and_run
,
[''])
testsuite/tests/ghc-regress/codeGen/should_run/cg059.hs
0 → 100644
View file @
168c6b2a
-- GHC 6.6 compiled YHC wrong; this is a cutdown testcase (from trac #1171).
module
Main
where
import
Directory
data
Error
=
ErrorFileNone
|
ErrorFileMany
FilePath
-- file you were looking for
raiseError
ErrorFileNone
=
error
"Error: File not found"
raiseError
(
ErrorFileMany
file
)
=
error
$
"Error: Found file multiple times: "
++
file
data
PackageData
=
PackageData
[
FilePath
]
deriving
Show
getModule
::
PackageData
->
String
->
IO
()
getModule
(
PackageData
rs
@
(
root
:
rest
))
file
=
do
local
<-
testPackage
root
res
<-
testPackage
root
print
(
local
,
res
)
case
(
local
,
res
)
of
([
x
],
_
)
->
return
()
(
_
,
[
x
])
->
return
()
(
[]
,
[]
)
->
raiseError
$
ErrorFileNone
(
as
,
bs
)
->
if
as
++
bs
==
[]
then
error
"Empty as++bs"
else
raiseError
$
ErrorFileMany
file
where
testPackage
pkg
=
do
bHi
<-
doesFileExist
""
return
[(
""
,
""
)
|
bHi
]
main
=
getModule
(
PackageData
[
"7"
])
"13"
testsuite/tests/ghc-regress/codeGen/should_run/cg059.stderr
0 → 100644
View file @
168c6b2a
cg059: Error: File not found
testsuite/tests/ghc-regress/codeGen/should_run/cg059.stdout
0 → 100644
View file @
168c6b2a
([],[])
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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