From e70605dfe681dbc0f79e0a8f426ac6c9fc9820a9 Mon Sep 17 00:00:00 2001 From: Nicole Rauch Date: Sun, 14 Aug 2016 19:51:45 +0200 Subject: We must avoid the compression of whitespace in constants by handling it in the same way. --- tests/Hakyll/Web/CompressCss/Tests.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Hakyll/Web/CompressCss/Tests.hs b/tests/Hakyll/Web/CompressCss/Tests.hs index 221aa82..065a588 100644 --- a/tests/Hakyll/Web/CompressCss/Tests.hs +++ b/tests/Hakyll/Web/CompressCss/Tests.hs @@ -23,6 +23,11 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat -- compress whitespace " something something " @=? compressCss " something \n\t\r something " + -- do not compress whitespace in constants + , "abc \" \t\n\r \" xyz" @=? + compressCss "abc \" \t\n\r \" xyz" + , "abc ' \t\n\r ' xyz" @=? + compressCss "abc ' \t\n\r ' xyz" -- strip comments , "" @=? compressCss "/* abc { } ;; \n\t\r */" @@ -40,7 +45,7 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat -- don't get irritated by the wrong constant terminator , "\" ' \"" @=? compressCss "\" ' \"" , "' \" '" @=? compressCss "' \" '" - -- don't compress whitespace in constants in the middle of a string + -- don't compress whitespace around separators in constants in the middle of a string , "abc '{ '" @=? compressCss "abc '{ '" , "abc \"{ \"" @=? compressCss "abc \"{ \"" -- compress multiple semicolons -- cgit v1.2.3