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

Align the rows.

This commit is contained in:
Rob Rix 2016-03-10 15:45:55 -05:00
parent 9c0b512092
commit 68c34c11b4

View File

@ -69,7 +69,7 @@ spec = parallel $ do
\ a b -> adjoinRows alignRows (pure (Closed [a])) [ b ] `shouldBe` [ pure (Closed [a]), b :: Row Char ]
it "aligns closed lines" $
foldr (adjoinRows (zipDefaults mempty)) [] (Prelude.zipWith (both) (pureBy (/= '\n') <$> "[ bar ]\nquux") (pureBy (/= '\n') <$> "[\nbar\n]\nquux")) `shouldBe`
foldr (adjoinRows alignRows) [] (Prelude.zipWith both (pureBy (/= '\n') <$> "[ bar ]\nquux") (pureBy (/= '\n') <$> "[\nbar\n]\nquux")) `shouldBe`
[ both (Closed "[ bar ]\n") (Closed "[\n")
, both mempty (Closed "bar\n")
, both mempty (Closed "]\n")