Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
ee28d6be
Commit
ee28d6be
authored
19 years ago
by
Isaac Potoczny-Jones
Browse files
Options
Downloads
Patches
Plain Diff
updated test cases
parent
9ef9613b
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/ModuleTest.hs
+9
-8
9 additions, 8 deletions
tests/ModuleTest.hs
tests/ffi-package/testffi.cabal
+1
-1
1 addition, 1 deletion
tests/ffi-package/testffi.cabal
with
10 additions
and
9 deletions
tests/ModuleTest.hs
+
9
−
8
View file @
ee28d6be
...
...
@@ -205,10 +205,11 @@ tests currDir comp compConf = [
assertBool
"testB not produced"
libForA
",tmp2"
,
TestLabel
(
"package A and install w/ no prefix: "
++
compIdent
)
$
TestCase
$
do
let
targetDir
=
",tmp/lib/test-1.0/ghc-6.
2.2
"
-- FIX: Compiler-version
do
let
targetDir
=
",tmp/lib/test-1.0/ghc-6.
4
"
-- FIX: Compiler-version
removeDirectoryRecursive
",tmp"
when
(
comp
==
GHC
)
-- FIX: hugs can't do --user yet
(
do
assertCmd'
compCmd
"install --user"
"install --user failed"
(
do
system
$
"ghc-pkg unregister --user test-1.0"
assertCmd'
compCmd
"install --user"
"install --user failed"
libForA
",tmp"
assertCmd'
compCmd
"unregister --user"
"unregister failed"
)
-- HUnit
...
...
@@ -280,7 +281,7 @@ tests currDir comp compConf = [
assertCopy
doesFileExist
"dist/build/A.hi-boot"
>>=
assertBool
"build did not move A.hi-boot file into place lib"
doesFileExist
",tmp/lib/recursive-1.0/ghc-6.
2.2
/libHSrecursive-1.0.a"
>>=
-- FIX: Comp
doesFileExist
",tmp/lib/recursive-1.0/ghc-6.
4
/libHSrecursive-1.0.a"
>>=
-- FIX: Comp
assertBool
"recursive build didn't create library"
doesFileExist
"dist/build/testExe/testExe-tmp/A.hi"
>>=
assertBool
"build did not move A.hi-boot file into place exe"
...
...
@@ -320,7 +321,7 @@ tests currDir comp compConf = [
>>=
assertBool
"library doesn't exist"
doesFileExist
(
",tmp/bin/mainForA"
)
>>=
assertBool
"installed bin doesn't exist"
doesFileExist
(
",tmp/lib/test-1.0/ghc-6.
2.2
/libHStest-1.0.a"
)
doesFileExist
(
",tmp/lib/test-1.0/ghc-6.
4
/libHStest-1.0.a"
)
>>=
assertBool
"installed lib doesn't exist"
)
-- wash2hs
,
TestLabel
(
"testing the wash2hs package"
++
compIdent
)
$
TestCase
$
...
...
@@ -358,7 +359,7 @@ tests currDir comp compConf = [
assertBool
"C.testSuffix did not get compiled to C.o."
doesFileExist
"dist/build/D.o"
>>=
assertBool
"D.gc did not get compiled to D.o this is an overriding test"
doesFileExist
(
",tmp/lib/withHooks-1.0/ghc-6.
2.2
/"
`
joinFileName
`
"libHSwithHooks-1.0.a"
)
doesFileExist
(
",tmp/lib/withHooks-1.0/ghc-6.
4
/"
`
joinFileName
`
"libHSwithHooks-1.0.a"
)
>>=
assertBool
"library doesn't exist"
)
doesFileExist
",tmp/bin/withHooks"
>>=
...
...
@@ -367,7 +368,7 @@ tests currDir comp compConf = [
doesFileExist
"C.hs"
>>=
assertEqual
"C.hs (a generated file) not cleaned."
False
-- HSQL
,
TestLabel
(
"package HSQL (make-based): "
++
show
compIdent
)
$
{-
,TestLabel ("package HSQL (make-based): " ++ show compIdent) $
TestCase $ unless (compFlag == "--hugs") $ -- FIX: won't compile w/ hugs
do setCurrentDirectory $ (testdir `joinFileName` "HSQL")
system "make distclean"
...
...
@@ -381,7 +382,7 @@ tests currDir comp compConf = [
assertCopy
when (comp == GHC) -- FIX: do something for hugs
(doesFileExist "/tmp/lib/HSQL/GHC/libHSsql.a" >>=
assertBool
"libHSsql.a doesn't exist. copy failed."
)
assertBool "libHSsql.a doesn't exist. copy failed.")
-}
]
where
testdir
=
currDir
`
joinFileName
`
"tests"
compStr
=
show
comp
...
...
@@ -401,7 +402,7 @@ tests currDir comp compConf = [
command
GHC
=
"./setup"
command
Hugs
=
"runhugs -98 Setup.lhs"
libForA
pref
-- checks to see if the lib exists, for tests/A
=
let
ghcTargetDir
=
pref
++
"/lib/test-1.0/ghc-6.
2.2
/"
in
=
let
ghcTargetDir
=
pref
++
"/lib/test-1.0/ghc-6.
4
/"
in
case
compConf
of
Hugs
->
checkTargetDir
(
pref
++
"/lib/hugs/packages/test/"
)
[
".hs"
]
GHC
->
do
checkTargetDir
ghcTargetDir
[
".hi"
]
...
...
This diff is collapsed.
Click to expand it.
tests/ffi-package/testffi.cabal
+
1
−
1
View file @
ee28d6be
Name: testffi
Version: 0.0
Build-Depends: base
hs-source-dir:
src
hs-source-dir: src
Exposed-modules: TestFFI
Extensions: ForeignFunctionInterface
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment