mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
Add a (failing) test that multiple children on the same line get aligned.
This commit is contained in:
parent
d35de99307
commit
07cf5dac3c
@ -105,6 +105,10 @@ spec = parallel $ do
|
||||
(info 12 12 `branch` []))
|
||||
]
|
||||
|
||||
it "aligns identical branches with multiple children on the same line" $
|
||||
alignDiff (pure (Source.fromList "[ foo, bar, baz ]")) (pure (info 0 17) `branch` [ pure (info 2 5) `leaf` "foo", pure (info 7 10) `leaf` "bar", pure (info 12 15) `leaf` "baz" ]) `shouldBe`
|
||||
[ Join (runBothWith These (pure (info 0 17 `branch` [ info 2 5 `leaf` "foo", info 7 10 `leaf` "bar", info 12 15 `leaf` "baz" ])) ) ]
|
||||
|
||||
where
|
||||
isOnSingleLine (a, _, _) = filter (/= '\n') (toString a) == toString a
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user