Add a test for issue #152

This commit is contained in:
John Wiegley 2018-04-10 11:22:54 -07:00
parent 6d275b6093
commit 84f809a568

View file

@ -278,6 +278,13 @@ case_select = do
(Just mkNull)
assertParseText "{}.\"\"or null" $ Fix $ NSelect (Fix (NSet []))
[ DynamicKey (Plain "") ] (Just mkNull)
assertParseText "{ a = [1]; }.a or [2] ++ [3]" $ Fix $ NBinary NConcat
(Fix (NSelect
(Fix (NSet [NamedVar [StaticKey "a" Nothing]
(Fix (NList [Fix (NConstant (NInt 1))]))]))
[StaticKey "a" Nothing]
(Just (Fix (NList [Fix (NConstant (NInt 2))])))))
(Fix (NList [Fix (NConstant (NInt 3))]))
case_select_path :: Assertion
case_select_path = do