Command tests: fail if a file contains no tests.
And fix a test that failed in that way!
This commit is contained in:
parent
6804f47383
commit
e0a1f7d2cf
2 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
```
|
||||
% pandoc -f biblatex -t markdown -s
|
||||
@Book{item1,
|
||||
author="John Doe",
|
||||
title="First Book",
|
||||
|
@ -27,7 +29,7 @@ year="2007"
|
|||
|
||||
^D
|
||||
---
|
||||
nocite: '[@*]'
|
||||
nocite: "[@*]"
|
||||
references:
|
||||
- author:
|
||||
- family: Doe
|
||||
|
@ -44,9 +46,9 @@ references:
|
|||
container-title: Journal of Generic Studies
|
||||
id: item2
|
||||
issued: 2006
|
||||
page: '33-34'
|
||||
page: 33-34
|
||||
title: Article
|
||||
type: 'article-journal'
|
||||
type: article-journal
|
||||
volume: 6
|
||||
- author:
|
||||
- family: Doe
|
||||
|
|
Loading…
Add table
Reference in a new issue