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.
This commit is contained in:
Pádraig Brady
2020-02-29 20:48:58 +00:00
parent de73a867ca
commit ea1c1b7515
4 changed files with 11 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ ln -s x link-to-x || framework_failure_
# symlink and an executable file properly.
LS_COLORS='or=0:mi=0:ex=01;32:ln=01;35' \
strace -qe stat ls -F --color=always x link-to-x > out.tmp 2> err || fail
strace -qe stat ls -F --color=always x link-to-x > out.tmp 2> err || fail=1
# Elide info messages strace can send to stdout of the form:
# [ Process PID=1234 runs in 32 bit mode. ]
sed '/Process PID=/d' out.tmp > out