aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-09-23 15:03:26 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-09-23 15:03:26 -0700
commite99050283edfd976ffba51256140a252d1e26508 (patch)
tree708c527c91fd693e08bdde4309eb6c15a99b1300 /test
parent67822bd925163eeceb35d0275f43d6261ea198e0 (diff)
downloadpandoc-e99050283edfd976ffba51256140a252d1e26508.tar.gz
ConTeXt unit tests - tweak code property.
Inline code will never have two consecutive newlines. We get a counterexample in this case https://pipelines.actions.githubusercontent.com/bMXCpShstkkHbFPgw9hBRMWw2w9plyzdVM8r7CRPFBHFvidaAG/5cf52d2d-3804-412d-ae65-4f8c059b0fb7/_apis/pipelines/1/runs/116/signedlogcontent/39?urlExpires=2019-09-23T17%3A38%3A05.8358735Z&urlSigningMethod=HMACV1&urlSignature=Qtd6vnzqgSwXpAkIyp9DJY4Kn7GJzYMR8UDkLR%2FsMQY%3D so for simplicity we just weed out code with newlines.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Writers/ConTeXt.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Tests/Writers/ConTeXt.hs b/test/Tests/Writers/ConTeXt.hs
index fa1782391..c11e409f8 100644
--- a/test/Tests/Writers/ConTeXt.hs
+++ b/test/Tests/Writers/ConTeXt.hs
@@ -44,7 +44,7 @@ tests :: [TestTree]
tests = [ testGroup "inline code"
[ "with '}'" =: code "}" =?> "\\mono{\\}}"
, "without '}'" =: code "]" =?> "\\type{]}"
- , testProperty "code property" $ \s -> null s ||
+ , testProperty "code property" $ \s -> null s || '\n' `elem` s ||
if '{' `elem` s || '}' `elem` s
then context' (code s) == "\\mono{" ++
context' (str s) ++ "}"