summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Web/CompressCss
diff options
context:
space:
mode:
authorBergi <a.d.bergi@web.de>2018-03-07 17:17:00 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2018-03-07 17:17:00 +0100
commit157fef58b97527b05b0400ad98d9cbdd2a33a0f4 (patch)
tree9c2078021cb9bab3333021251a108f4971342f98 /tests/Hakyll/Web/CompressCss
parent5dc0b60e6f607fada3d72566dcd1ca4cbfe14c4d (diff)
downloadhakyll-157fef58b97527b05b0400ad98d9cbdd2a33a0f4.tar.gz
Optimise CSS compression
Diffstat (limited to 'tests/Hakyll/Web/CompressCss')
-rw-r--r--tests/Hakyll/Web/CompressCss/Tests.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/Hakyll/Web/CompressCss/Tests.hs b/tests/Hakyll/Web/CompressCss/Tests.hs
index 66922cd..ae4aba0 100644
--- a/tests/Hakyll/Web/CompressCss/Tests.hs
+++ b/tests/Hakyll/Web/CompressCss/Tests.hs
@@ -20,9 +20,9 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat
[ fromAssertions "compressCss"
[
-- compress whitespace
- " something something " @=?
+ "something something" @=?
compressCss " something \n\t\r something "
- -- do not compress whitespace in constants
+ -- do not compress whitespace in string tokens
, "abc \" \t\n\r \" xyz" @=?
compressCss "abc \" \t\n\r \" xyz"
, "abc ' \t\n\r ' xyz" @=?
@@ -30,7 +30,7 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat
-- strip comments
, "before after" @=? compressCss "before /* abc { } ;; \n\t\r */ after"
- -- don't strip comments inside constants
+ -- don't strip comments inside string tokens
, "before \"/* abc { } ;; \n\t\r */\" after"
@=? compressCss "before \"/* abc { } ;; \n\t\r */\" after"
@@ -45,19 +45,19 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat
, "calc(1px + 100%/(5 + 3) - (3px + 2px)*5)" @=? compressCss "calc( 1px + 100% / ( 5 + 3) - calc( 3px + 2px ) * 5 )"
-- compress whitespace even after this curly brace
, "}" @=? compressCss "; } "
- -- but do not compress separators inside of constants
+ -- but do not compress separators inside string tokens
, "\" { } ; , \"" @=? compressCss "\" { } ; , \""
- -- don't compress separators at the start or end of constants
+ -- don't compress separators at the start or end of string tokens
, "\" }\"" @=? compressCss "\" }\""
, "\"{ \"" @=? compressCss "\"{ \""
- -- don't get irritated by the wrong constant terminator
+ -- don't get irritated by the wrong token delimiter
, "\" ' \"" @=? compressCss "\" ' \""
, "' \" '" @=? compressCss "' \" '"
- -- don't compress whitespace around separators in constants in the middle of a string
+ -- don't compress whitespace in the middle of a string
, "abc '{ '" @=? compressCss "abc '{ '"
, "abc \"{ \"" @=? compressCss "abc \"{ \""
- -- compress whitespace around colons
- , "abc:xyz" @=? compressCss "abc : xyz"
+ -- compress whitespace after colons (but not before)
+ , "abc :xyz" @=? compressCss "abc : xyz"
-- compress multiple semicolons
, ";" @=? compressCss ";;;;;;;"
]