Check trap flags under dash & POSIX sh (fixes #1461)
This commit is contained in:
parent
c6c615217b
commit
8e31e86cc4
|
@ -149,6 +149,7 @@ prop_checkBashisms66 = verifyNot checkBashisms "#!/bin/sh\ncd -P ."
|
||||||
prop_checkBashisms67 = verify checkBashisms "#!/bin/sh\ncd -P -e ."
|
prop_checkBashisms67 = verify checkBashisms "#!/bin/sh\ncd -P -e ."
|
||||||
prop_checkBashisms68 = verify checkBashisms "#!/bin/sh\numask -p"
|
prop_checkBashisms68 = verify checkBashisms "#!/bin/sh\numask -p"
|
||||||
prop_checkBashisms69 = verifyNot checkBashisms "#!/bin/sh\numask -S"
|
prop_checkBashisms69 = verifyNot checkBashisms "#!/bin/sh\numask -S"
|
||||||
|
prop_checkBashisms70 = verify checkBashisms "#!/bin/sh\ntrap -l"
|
||||||
checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
||||||
params <- ask
|
params <- ask
|
||||||
kludge params t
|
kludge params t
|
||||||
|
@ -300,6 +301,7 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
||||||
("printf", Just []),
|
("printf", Just []),
|
||||||
("read", Just $ if isDash then ["r", "p"] else ["r"]),
|
("read", Just $ if isDash then ["r", "p"] else ["r"]),
|
||||||
("readonly", Just ["p"]),
|
("readonly", Just ["p"]),
|
||||||
|
("trap", Just []),
|
||||||
("ulimit", if isDash then Nothing else Just ["f"]),
|
("ulimit", if isDash then Nothing else Just ["f"]),
|
||||||
("umask", Just ["S"])
|
("umask", Just ["S"])
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue