diff --git a/test/Prelude.purs b/test/Prelude.purs index 9477ac586..9ef083142 100644 --- a/test/Prelude.purs +++ b/test/Prelude.purs @@ -98,15 +98,20 @@ shouldEqualStr -> String -> m Unit shouldEqualStr v1 v2 = + let + renderNonPrinting = + String.replaceAll (String.Pattern "\r") (String.Replacement "␍") + >>> String.replaceAll (String.Pattern "\t") (String.Replacement "␉-->") + in when (v1 /= v2) do fail $ Array.intercalate "\n" [ "" , "===== (Actual)" - , v1 + , renderNonPrinting v1 , "=====" , " ≠" , "===== (Expected)" - , v2 + , renderNonPrinting v2 , "=====" , "" ] diff --git a/test/Spago/Build.purs b/test/Spago/Build.purs index bfbe4c258..9d91e68c0 100644 --- a/test/Spago/Build.purs +++ b/test/Spago/Build.purs @@ -39,9 +39,10 @@ spec = Spec.around withTempDir do { stdoutFile: Nothing , stderrFile: Just (fixture "purs-not-ok.txt") , result: isLeft - , sanitize: String.trim - >>> String.replace (String.Pattern "Usage: purs.bin") (String.Replacement "Usage: purs") - >>> String.replace (String.Pattern "\r\n") (String.Replacement "\n") + , sanitize: + String.trim + >>> String.replaceAll (String.Pattern "Usage: purs.bin") (String.Replacement "Usage: purs") + >>> String.replaceAll (String.Pattern "\r\n") (String.Replacement "\n") } Spec.it "passes options to purs" \{ spago } -> do