Skip to content

Commit

Permalink
Add a failing test for #140
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Feldman committed Jul 22, 2016
1 parent 89d3844 commit edf8347
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/Fixtures.elm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ bug99 =
]


bug140 : Stylesheet
bug140 =
stylesheet
[ each [ input, selector "textarea" ]
[ focus
[ borderColor (hex "#000000")
]
]
]


simpleEach : Stylesheet
simpleEach =
stylesheet
Expand Down
23 changes: 23 additions & 0 deletions test/Tests.elm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ all =
, atRule
, nestedAtRule
, bug99
, bug140
, universal
, multiSelector
, multiDescendent
Expand Down Expand Up @@ -210,6 +211,28 @@ nestedAtRule =
]


{-| Regression test for https://github.com/rtfeldman/elm-css/issues/140
-}
bug140 : Test
bug140 =
let
input =
Fixtures.bug140

output =
"""
input:focus, textarea:focus {
border-color: #000000;
} """
in
describe "`each` with pseudo classes"
[ test "pretty prints the expected output" <|
\_ ->
outdented (prettyPrint input)
|> Expect.equal (outdented output)
]


{-| Regression test for https://github.com/rtfeldman/elm-css/issues/99
-}
bug99 : Test
Expand Down

0 comments on commit edf8347

Please sign in to comment.