aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Command.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-26 09:52:23 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-26 09:52:23 -0700
commite0a1f7d2cfa1b18210ea13e0aa03747e6c76e5c5 (patch)
tree10008e31b1cf7a3e8fd00f6ea0d6acad4aa5caa7 /test/Tests/Command.hs
parent6804f47383a954fc1fb48e44ab0383f9f72d5dea (diff)
downloadpandoc-e0a1f7d2cfa1b18210ea13e0aa03747e6c76e5c5.tar.gz
Command tests: fail if a file contains no tests.
And fix a test that failed in that way!
Diffstat (limited to 'test/Tests/Command.hs')
-rw-r--r--test/Tests/Command.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs
index 3ec6d7230..539be1a1a 100644
--- a/test/Tests/Command.hs
+++ b/test/Tests/Command.hs
@@ -130,4 +130,7 @@ extractCommandTest testExePath fp = unsafePerformIO $ do
def{ readerExtensions = pandocExtensions } contents)
let codeblocks = map extractCode $ filter isCodeBlock blocks
let cases = zipWith (runCommandTest testExePath fp) [1..] codeblocks
- return $ testGroup fp cases
+ return $ testGroup fp
+ $ if null cases
+ then [testCase "!!" $ assertFailure "No command tests defined"]
+ else cases