tests: fix false fails due to passing env vars to returns_
commit055b08ff7853c7c9ab791643047b1b163a227013
authorPádraig Brady <P@draigBrady.com>
Tue, 22 Nov 2016 01:23:22 +0000 (22 01:23 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 22 Nov 2016 20:04:25 +0000 (22 20:04 +0000)
tree15d7a014a486c9c0189cef9511c7e7c7b0470620
parentb572a286d5d24cdb1669baa3f867317bdb534b1a
tests: fix false fails due to passing env vars to returns_

On BSD /bin/sh it was seen that unexported env vars passed to
returns_() would not be propagated to the wrapped command.

* cfg.mk (sc_prohibit_env_returns): Add a syntax check to disallow.
* tests/misc/csplit-io-err.sh: Rearrange to export vars in a subshell.
* tests/rm/rm-readdir-fail.sh: Likewise.
* tests/misc/nohup.sh: Export and unset vars around returns_.
* tests/misc/printenv.sh: Likewise.
Reported by Assaf Gordon
cfg.mk
tests/misc/csplit-io-err.sh
tests/misc/nohup.sh
tests/misc/printenv.sh
tests/rm/rm-readdir-fail.sh