https://phabricator.haskell.org/D518

Can someone give me guidance on how to write a test case? I am trying to
write a test case for a new flag that generates a file (much like
-ddump-to-file).

I started by trying to cat the generated file to get it into the
stdout/stderr

+test('T8624', normal, run_command,+     ['echo $MAKE && $MAKE T8624
&& cat T8624.th.hs'])

But I get this error:

cd . && echo $MAKE && $MAKE T8624 && cat T8624.th.hs    </dev/null
>T8624.run.stdout 2>T8624.run.stderrmakemake[1]: Entering directory
'/home/ghc/testsuite/tests/th'cc   T8624.o   -o
T8624/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o:
In function `_start':(.text+0x20): undefined reference to
`main'collect2: error: ld returned 1 exit status<builtin>: recipe for
target 'T8624' failedmake[1]: *** [T8624] Error 1make[1]: Leaving
directory '/home/ghc/testsuite/tests/th'Wrong exit code (expected 0 ,
actual 2 )
_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to