Commit cd10aa46 authored by Simon Marlow's avatar Simon Marlow

add test for #1288

parent acdb4e6d
import Foreign
import Foreign.C
foreign import stdcall "test" ctest :: CInt -> IO ()
main = ctest 3
......@@ -5,3 +5,7 @@ include $(TOP)/mk/test.mk
ffi018_ghci_setup :
cp ffi018_c.c ffi018_ghci_c.c
$(TEST_HC) -c ffi018_ghci_c.c
1288_ghci_setup :
cp 1288_c.c 1288_ghci_c.c
$(TEST_HC) -c 1288_ghci_c.c
......@@ -74,11 +74,11 @@ test('ffi011', normal, compile_and_run, [''])
# it.
if config.platform == 'i386-unknown-mingw32':
f = normal
skip_if_not_windows = normal
else:
f = skip
skip_if_not_windows = skip
test('ffi012', f, compile_and_run, [''])
test('ffi012', skip_if_not_windows, compile_and_run, [''])
# Doesn't work with External Core due to __labels
test('ffi013', expect_fail_for(['extcore','optextcore']), compile_and_run, [''])
......@@ -108,3 +108,13 @@ test('ffi019', normal, compile_and_run, [''])
# This one originally failed only GHCi, but doesn't hurt to test all ways.
test('1679', normal, compile_and_run, [''])
test('1288', [ skip_if_not_windows, omit_ways(['ghci']),
extra_clean(['1288_c.o']) ],
compile_and_run, ['1288_c.c'])
test('1288', [ skip_if_not_windows, only_ways(['ghci']),
cmd_prefix('$MAKE --no-print-directory -C ' + getTestDir() +
' 1288_ghci_setup && '),
extra_clean(['1288_ghci_c.c', '1288_ghci_c.o']) ],
compile_and_run, ['1288_ghci_c.o'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment