ram*_*ion 5 testing doctest haskell
如果我有三个模块:
-- A.hs
module A where
-- $
-- >>> True
-- True
-- B.hs
module B where
import A
-- $
-- >>> True
-- True
-- C.hs
module C where
import B
-- $
-- >>> True
-- True
Run Code Online (Sandbox Code Playgroud)
运行doctest C.hs将运行所有三个文件中的所有 doctest。
$ doctest C.hs
Examples: 3 Tried: 3 Errors: 0 Failures: 0
Run Code Online (Sandbox Code Playgroud)
有没有办法doctest只在顶级模块上运行——也就是说,它不是递归搜索包含模块中的测试吗?