Allow {} in arithmetic for loops

This commit is contained in:
Vidar Holen 2014-01-26 12:44:51 -08:00
parent 7ad0110443
commit 4262c4b1bf
2 changed files with 14 additions and 7 deletions

View file

@ -1371,6 +1371,7 @@ checkSpuriousExec = doLists
doLists (T_WhileExpression _ _ cmds) = doList cmds
doLists (T_UntilExpression _ _ cmds) = doList cmds
doLists (T_ForIn _ _ _ cmds) = doList cmds
doLists (T_ForArithmetic _ _ _ _ cmds) = doList cmds
doLists (T_IfExpression _ thens elses) = do
mapM_ (\(_, l) -> doList l) thens
doList elses
@ -1968,6 +1969,7 @@ prop_checkCdAndBack3 = verifyNot (checkCdAndBack Sh) "while [[ $PWD != / ]]; do
checkCdAndBack shell = doLists
where
doLists (T_ForIn _ _ _ cmds) = doList cmds
doLists (T_ForArithmetic _ _ _ _ cmds) = doList cmds
doLists (T_WhileExpression _ _ cmds) = doList cmds
doLists (T_UntilExpression _ _ cmds) = doList cmds
doLists (T_IfExpression _ thens elses) = do