资 源 简 介
hs-doctest: doctest tool for haskell
GIT
http://github.com/nkchenz/hs-doctest/tree/master
INTRO
Test cases begin with "> ", followed by its expected output, like test1. If nothing is between two tests, means the first test has no output, like test2. Output is terminated by a blank line, like test3, its output is only "2". You can use BLANKLINE to represent a blankline in output, like test4.
```
{-
test1 [1, 2]
1
test2
test3 [1, 2][2]
This is not output of test3
test4
test5
-}
```
"> " can be changed to anything you like by modifiing PROMPT
PROMPT = "> " # Prompt recognized in commentsHI_PROMPT = "Prelude> "MODULE_PROMPT = "*Main> " # After load source file, module context
We start a new ghci thread, use ":load testfile" loading the whole file first,
then run each test case by writing t