help writing a test case
Greg Weber
greg at gregweber.info
Tue Dec 9 22:10:48 UTC 2014
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 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141209/b7414dcb/attachment-0001.html>
More information about the ghc-devs
mailing list