@@ -70,10 +70,16 @@ test name path act =
7070 cmp x y = return $ if normalize x == normalize y then Nothing
7171 else Just $ printDiff (ref, x) (new, y)
7272 upd = writeFile ref
73+ -- just pretend that backslashes are slashes for comparison
74+ -- purposes to avoid path problems, so don't write any tests
75+ -- that depend on that distinction in other contexts.
76+ -- Also compare CRLF and LF as equal, fixes a weird corner case
77+ -- on Mac where basic010 and reg039 produces CRLF
7378 normalize [] = []
74− normalize ('\\':'\\':xs) = '/':normalize xs
75− normalize ('\\':xs) = '/':normalize xs
76− normalize (x:xs) = x:normalize xs
79+ normalize ('\r':'\n':xs) = '\n' : normalize xs
80+ normalize ('\\':'\\':xs) = '/' : normalize xs
81+ normalize ('\\':xs) = '/' : normalize xs
82+ normalize (x : xs) = x : normalize xs
7783
7884
7985-- Takes the filepath and content of `expected` and `output`