Commit 73b97bdf authored by Simon Marlow's avatar Simon Marlow
Browse files

Add test for #6006

parent 32b2573a
......@@ -45,3 +45,5 @@ T5423:
"$(TEST_HC)" $(TEST_HC_OPTS) -v0 T5423.o T5423_cmm.o -o T5423$(exeext)
T6006_setup :
'$(TEST_HC)' $(TEST_HC_OPTS) -c T6006.hs
module F where
import System.Environment
foreign export ccall f :: IO ()
f = do
getProgName >>= print
getArgs >>= print
#include "HsFFI.h"
#include "T6006_stub.h"
#include <stdlib.h>
int main(int argc, char** argv) {
......@@ -130,3 +130,12 @@ test('T5423',
['$MAKE -s --no-print-directory T5423'])
test('5993', extra_run_opts('+RTS -k8 -RTS'), compile_and_run, [''])
test('T6006', [ omit_ways(['ghci']),
compile_cmd_prefix('$MAKE T6006_setup && ') ],
# The T6006_setup hack is to ensure that we generate
# T6006_stub.h before compiling T6006_c.c, which
# needs it.
compile_and_run, ['T6006_c.c -no-hs-main'])
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