Revert "Fixed parsing for 'eval var=(values)'", because it fails for 'eval $x=foo'

This reverts commit 34e69556b1.
This commit is contained in:
Vidar Holen 2013-09-29 21:35:20 -07:00
parent 702d57b655
commit 710a28c572
1 changed files with 1 additions and 2 deletions

View File

@ -1153,7 +1153,6 @@ prop_readSimpleCommand = isOk readSimpleCommand "echo test > file"
prop_readSimpleCommand2 = isOk readSimpleCommand "cmd &> file" prop_readSimpleCommand2 = isOk readSimpleCommand "cmd &> file"
prop_readSimpleCommand3 = isOk readSimpleCommand "export foo=(bar baz)" prop_readSimpleCommand3 = isOk readSimpleCommand "export foo=(bar baz)"
prop_readSimpleCommand4 = isOk readSimpleCommand "typeset -a foo=(lol)" prop_readSimpleCommand4 = isOk readSimpleCommand "typeset -a foo=(lol)"
prop_readSimpleCommand5 = isOk readSimpleCommand "eval foo=(bar baz)"
readSimpleCommand = called "simple command" $ do readSimpleCommand = called "simple command" $ do
id1 <- getNextId id1 <- getNextId
id2 <- getNextId id2 <- getNextId
@ -1170,7 +1169,7 @@ readSimpleCommand = called "simple command" $ do
return $ makeSimpleCommand id1 id2 prefix [cmd] suffix return $ makeSimpleCommand id1 id2 prefix [cmd] suffix
where where
isModifierCommand (T_NormalWord _ [T_Literal _ s]) = isModifierCommand (T_NormalWord _ [T_Literal _ s]) =
s `elem` ["declare", "export", "local", "readonly", "typeset", "eval"] s `elem` ["declare", "export", "local", "readonly", "typeset"]
isModifierCommand _ = False isModifierCommand _ = False
prop_readPipeline = isOk readPipeline "! cat /etc/issue | grep -i ubuntu" prop_readPipeline = isOk readPipeline "! cat /etc/issue | grep -i ubuntu"