mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-22 14:23:53 -07:00
Add test for issue 1733
This commit is contained in:
parent
be0d0247b1
commit
5c3b44f4e1
1 changed files with 1 additions and 0 deletions
|
@ -2788,6 +2788,7 @@ prop_checkMaskedReturns2 = verify checkMaskedReturns "declare a=$(false)"
|
|||
prop_checkMaskedReturns3 = verify checkMaskedReturns "declare a=\"`false`\""
|
||||
prop_checkMaskedReturns4 = verifyNot checkMaskedReturns "declare a; a=$(false)"
|
||||
prop_checkMaskedReturns5 = verifyNot checkMaskedReturns "f() { local -r a=$(false); }"
|
||||
prop_checkMaskedReturns6 = verify checkMaskedReturns "V=\"$(false)\" cmd"
|
||||
checkMaskedReturns _ t@(T_SimpleCommand id preopts (cmd:rest)) = potentially $ do
|
||||
name <- getCommandName t
|
||||
guard $ name `elem` ["declare", "export"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue