diff options
author | Pádraig Brady <P@draigBrady.com> | 2020-02-29 20:48:58 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2020-02-29 22:45:00 +0000 |
commit | ea1c1b75153740355fd54c4455237be1f8cbd427 (patch) | |
tree | 6144b57ce379287b8e33a476f6db7eb2a90990b8 /cfg.mk | |
parent | de73a867ca989e6cf1929f511d2679aa2085c2be (diff) | |
download | coreutils-ea1c1b75153740355fd54c4455237be1f8cbd427.tar.gz |
tests: fix incorrect `|| fail` pattern in tests
* tests/ls/stat-free-symlinks.sh: s/|| fail/|| fail=1/.
* tests/misc/tee.sh: Likewise.
* tests/touch/relative.sh: Likewise.
* cfg.mk (sc_prohibit_or_fail): A new syntax-check to avoid this.
Diffstat (limited to 'cfg.mk')
-rw-r--r-- | cfg.mk | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -519,6 +519,14 @@ sc_prohibit_and_fail_1: in_vc_files='^tests/' \ $(_sc_search_regexp) +# Ensure that tests don't use `cmd ... || fail` as that's a noop. +sc_prohibit_or_fail: + @prohibit='\|\| fail$$' \ + exclude=':#' \ + halt='|| fail detected. Please use: || fail=1' \ + in_vc_files='^tests/' \ + $(_sc_search_regexp) + # Ensure that env vars are not passed through returns_ as # that was seen to fail on FreeBSD /bin/sh at least sc_prohibit_env_returns: |