Skip to content

Commit

Permalink
better unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paraseba committed May 4, 2010
1 parent d26d127 commit 46b7c67
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/selectors.clj
Expand Up @@ -9,18 +9,31 @@

["body"] (rule "body")
["body" "body table"] (rule "body" (rule "table"))
["body" "body table"] (rule "body" (mixin (rule "table")))
["body" "body table"] (rule "body" (mixin (mixin (mixin (rule "table")))))
["body" "body table" "body table tr"] (rule "body" (rule "table" (rule "tr")))
["body" "body table" "body table tr"] (rule "body" (mixin (rule "table" (mixin (rule "tr")))))

["a" "a:hover"] (rule "a" (rule "&:hover"))
["a" "a:hover"] (rule "a" (mixin (rule "&:hover")))
["body a" "body a:hover, body a:visited"] (rule "body a" (rule "&:hover, &:visited"))
["body a" "body a:hover, body a:visited"] (rule "body a" (mixin (rule "&:hover, &:visited")))
["a" "html a:hover"] (rule "a" (rule "html &:hover"))
["a" "html a:hover"] (rule "a" (mixin (rule "html &:hover")))

["body" "body a, body input"] (rule "body" (rule "a, input"))
["body" "body a, body input"] (rule "body" (mixin (rule "a, input")))
["body, #footer" "body a, #footer a"] (rule "body , #footer" (rule " a "))
["body, #footer" "body a, #footer a"] (rule "body , #footer" (mixin (rule " a ")))
["body, #footer" "body a, body input, #footer a, #footer input"] (rule " body , #footer " (rule " a , input "))
["body, #footer" "body a, body input, #footer a, #footer input"] (rule " body , #footer " (mixin (rule " a , input ")))

["body" "body a, body:hover"] (rule "body" (rule "a, &:hover"))
["body" "body a, body:hover"] (rule "body" (mixin (rule "a, &:hover")))
["#foo, .bar" "#foo:hover, .bar:hover"] (rule "#foo, .bar" (rule "&:hover"))
["#foo, .bar" "#foo:hover, #foo:visited, .bar:hover, .bar:visited"] (rule "#foo, .bar" (rule "&:hover, &:visited"))))

["#foo, .bar" "#foo:hover, .bar:hover"] (rule "#foo, .bar" (mixin (rule "&:hover")))
["#foo, .bar" "#foo:hover, #foo:visited, .bar:hover, .bar:visited"] (rule "#foo, .bar" (rule "&:hover, &:visited"))
["#foo, .bar" "#foo:hover, #foo:visited, .bar:hover, .bar:visited"] (rule "#foo, .bar" (mixin (rule "&:hover, &:visited")))

["div" "div span" "div span a"] (rule "div" (rule "span" (rule "a")))
["div" "div span" "div span a"] (rule "div" (mixin (rule "span" (mixin (rule "a")))))))

0 comments on commit 46b7c67

Please sign in to comment.