help writing a test case

Greg Weber greg at
Tue Dec 9 22:10:48 UTC 2014

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

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

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

But I get this error:

cd . && echo $MAKE && $MAKE T8624 && cat    </dev/null
> 2>[1]: Entering directory
'/home/ghc/testsuite/tests/th'cc   T8624.o   -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 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list