From e99050283edfd976ffba51256140a252d1e26508 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 23 Sep 2019 15:03:26 -0700 Subject: 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. --- test/Tests/Writers/ConTeXt.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) ++ "}" -- cgit v1.2.3