1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Correct the predicate.

This commit is contained in:
Rob Rix 2016-03-08 22:10:35 -05:00
parent 0bc811e3c1
commit cef2be6495

View File

@ -93,7 +93,7 @@ spec = parallel $ do
\ a -> adjoinRowsBy (pure Maybe.isJust) (makeRow EmptyLine (pure Nothing)) [ makeRow (pure (Just a)) (pure Nothing), makeRow (pure Nothing) (pure Nothing) ] `shouldBe` [ makeRow (pure (Just a)) (pure Nothing), makeRow EmptyLine (pure Nothing), makeRow (pure Nothing) (pure Nothing) :: Row (Maybe Bool) ]
it "aligns closed lines" $
foldr (adjoinRowsBy (pure (== '\n'))) [] (Prelude.zipWith (makeRow) (pure <$> "[ bar ]\nquux") (pure <$> "[\nbar\n]\nquux")) `shouldBe`
foldr (adjoinRowsBy (pure (/= '\n'))) [] (Prelude.zipWith (makeRow) (pure <$> "[ bar ]\nquux") (pure <$> "[\nbar\n]\nquux")) `shouldBe`
[ makeRow (makeLine "[ bar ]\n") (makeLine "[\n")
, makeRow EmptyLine (makeLine "bar\n")
, makeRow EmptyLine (makeLine "]\n")