-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with test frameworks #1
Comments
I think LANGUAGE pragmas on files should already work. But we have to take care of additional options given in the .cabal file. Or did I get something wrong? |
It does not appear to be working for me. Try out the following file:
When run with --optghc=-XQuasiQuotes, it works perfectly. Without, it says:
|
Sorry for the late response, I had to thoroughly think about it to get it (hopefully) right. Firstly you are right. I only had the following in mind, which of course works:
I think, passing module pragmas with
The following works as expected: But passing the language pragma from
Right now I see nothing that we can do to make your use case more convenient without breaking other code. Any ideas? |
As Daniel Fischer pointed out, it is possible to change language flags at runtime with |
I started exposing doctest as a library at https://github.com/sakari/doctest-haskell/tree/sakari%2Fdoctest-lib any comments on the work in progress are appreciated. The idea is just to get the bare bones functionality working together with https://github.com/sakari/test-framework-doctest i.e., I will not work on cabal integration or language pragma setting. Maybe those could be separated into new issues? |
Hey, nice to see work on this! Yes, it is probably a good idea to have separate issues for both cabal integration and language pragma settings. |
It would be great if doctest could be easily run from existing test frameworks. Based on our email discussion[1], it sounds like the best way to do this would be to provide a function:
I'm assuming that "Test" here would be from HUnit. Two additional features I would like to ask for are:
Thanks
[1] http://www.haskell.org/pipermail/haskell-cafe/2011-April/090827.html
The text was updated successfully, but these errors were encountered: