Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
eb9accfc
Commit
eb9accfc
authored
Sep 22, 2011
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a test for foreign imports in GHCi
parent
7f1d4e74
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
0 deletions
+23
-0
testsuite/driver/testlib.py
testsuite/driver/testlib.py
+3
-0
testsuite/tests/ghci/scripts/Makefile
testsuite/tests/ghci/scripts/Makefile
+2
-0
testsuite/tests/ghci/scripts/all.T
testsuite/tests/ghci/scripts/all.T
+9
-0
testsuite/tests/ghci/scripts/ghci056.script
testsuite/tests/ghci/scripts/ghci056.script
+2
-0
testsuite/tests/ghci/scripts/ghci056.stdout
testsuite/tests/ghci/scripts/ghci056.stdout
+1
-0
testsuite/tests/ghci/scripts/ghci056_c.c
testsuite/tests/ghci/scripts/ghci056_c.c
+6
-0
No files found.
testsuite/driver/testlib.py
View file @
eb9accfc
...
...
@@ -796,6 +796,9 @@ def ghci_script( name, way, script ):
' --interactive -v0 -ignore-dot-ghci '
+
\
join
(
flags
,
' '
)
if
getTestOpts
().
cmd_prefix
!=
''
:
cmd
=
getTestOpts
().
cmd_prefix
+
' '
+
cmd
;
getTestOpts
().
stdin
=
script
return
simple_run
(
name
,
way
,
cmd
,
getTestOpts
().
extra_run_opts
)
...
...
testsuite/tests/ghci/scripts/Makefile
View file @
eb9accfc
...
...
@@ -31,3 +31,5 @@ ghci037:
'
$(TEST_HC)
'
$(TEST_HC_OPTS)
--interactive
-v0
-ignore-dot-ghci
< ghci037.script
'
$(TEST_HC)
'
$(TEST_HC_OPTS)
--interactive
-v0
-ignore-dot-ghci
-fno-ghci-sandbox
< ghci037.script
ghci056_setup
:
'
$(TEST_HC)
'
$(TEST_HC_OPTS)
-c
ghci056_c.c
testsuite/tests/ghci/scripts/all.T
View file @
eb9accfc
...
...
@@ -72,6 +72,15 @@ test('ghci052', normal, ghci_script, ['ghci052.script'])
test
('
ghci053
',
normal
,
ghci_script
,
['
ghci053.script
'])
test
('
ghci054
',
normal
,
ghci_script
,
['
ghci054.script
'])
test
('
ghci055
',
normal
,
ghci_script
,
['
ghci055.script
'])
test
('
ghci056
',
[
cmd_prefix
('
$MAKE --no-print-directory ghci056_setup &&
'),
extra_run_opts
('
ghci056_c.o
'),
extra_clean
('
ghci056_c.o
')
],
ghci_script
,
['
ghci056.script
'])
test
('
2452
',
normal
,
ghci_script
,
['
2452.script
'])
test
('
T2766
',
normal
,
ghci_script
,
['
T2766.script
'])
...
...
testsuite/tests/ghci/scripts/ghci056.script
0 → 100644
View file @
eb9accfc
foreign import ccall "f" f :: Int -> Int -> Int
f 2 3
testsuite/tests/ghci/scripts/ghci056.stdout
0 → 100644
View file @
eb9accfc
5
testsuite/tests/ghci/scripts/ghci056_c.c
0 → 100644
View file @
eb9accfc
#include "HsFFI.h"
HsInt
f
(
HsInt
x
,
HsInt
y
)
{
return
(
x
+
y
);
}
Write
Preview
Markdown
is supported
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