Running Single Test with `doctest`

64 views
Skip to first unread message

Kevin Meredith

unread,
Mar 10, 2015, 10:31:29 PM3/10/15
to nict...@googlegroups.com
I'm trying to run a single test by following the instructions:

>doctest -isrc -Wall -fno-warn-type-defaults <filename.hs>

From the base directory, I ran `doctest` from `ghci` and from the command line, but neither worked.

Here's the output from ghci since running `doctest` from the command-line itself probably doesn't make sense?

>> doctest -isrc -Wall -fno-warn-type-defaults Id.hs
<interactive>:4:31: parse error on input ‘type’



Luis Fernando Milano Oliveira

unread,
Mar 11, 2015, 8:45:08 AM3/11/15
to nict...@googlegroups.com
I think the only thing you missed is to include the full path for the file you want to test.

It will go like this(running from the command line, inside the base directory):
$ doctest -isrc -Wall -fno-warn-type-defaults src/Course/Id.hs

Kevin Meredith

unread,
Mar 11, 2015, 10:04:09 PM3/11/15
to nict...@googlegroups.com
Thanks, Luis.

I had to add `doctest` to the $PATH too, and then the command worked.
Reply all
Reply to author
Forward
0 new messages