mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-18 03:11:15 +02:00
11711: Andrej: diff output workaround
This commit is contained in:
parent
9ac1ee5703
commit
b24757fc34
2 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2000-06-07 Peter Stephenson <pws@cambridgesiliconradio.com>
|
||||||
|
|
||||||
|
* 11711: Andrej Borsenkow: Test/ztst.zsh: Ignore diff output
|
||||||
|
unless the test failed, to work around some diffs which produce
|
||||||
|
success messages.
|
||||||
|
|
||||||
2000-06-07 Sven Wischnowsky <wischnow@zsh.org>
|
2000-06-07 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
* 11794: Src/Zle/compcore.c, Src/Zle/complist.c, Src/Zle/zle_tricky.c:
|
* 11794: Src/Zle/compcore.c, Src/Zle/complist.c, Src/Zle/zle_tricky.c:
|
||||||
|
|
|
@ -219,6 +219,19 @@ $ZTST_code"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# diff wrapper
|
||||||
|
ZTST_diff() {
|
||||||
|
local diff_out diff_ret
|
||||||
|
|
||||||
|
diff_out=$(diff "$@")
|
||||||
|
diff_ret="$?"
|
||||||
|
if [[ "$diff_ret" != "0" ]]; then
|
||||||
|
echo "$diff_out"
|
||||||
|
fi
|
||||||
|
|
||||||
|
return "$diff_ret"
|
||||||
|
}
|
||||||
|
|
||||||
ZTST_test() {
|
ZTST_test() {
|
||||||
local last match mbegin mend found
|
local last match mbegin mend found
|
||||||
|
|
||||||
|
@ -297,13 +310,13 @@ ZTST_test: and standard error:
|
||||||
$(<$ZTST_terr)"
|
$(<$ZTST_terr)"
|
||||||
|
|
||||||
# Now check output and error.
|
# Now check output and error.
|
||||||
if [[ $ZTST_flags != *d* ]] && ! diff -c $ZTST_out $ZTST_tout; then
|
if [[ $ZTST_flags != *d* ]] && ! ZTST_diff -c $ZTST_out $ZTST_tout; then
|
||||||
ZTST_testfailed "output differs from expected as shown above for:
|
ZTST_testfailed "output differs from expected as shown above for:
|
||||||
$ZTST_code${$(<$ZTST_terr):+
|
$ZTST_code${$(<$ZTST_terr):+
|
||||||
Error output:
|
Error output:
|
||||||
$(<$ZTST_terr)}"
|
$(<$ZTST_terr)}"
|
||||||
fi
|
fi
|
||||||
if [[ $ZTST_flags != *D* ]] && ! diff -c $ZTST_err $ZTST_terr; then
|
if [[ $ZTST_flags != *D* ]] && ! ZTST_diff -c $ZTST_err $ZTST_terr; then
|
||||||
ZTST_testfailed "error output differs from expected as shown above for:
|
ZTST_testfailed "error output differs from expected as shown above for:
|
||||||
$ZTST_code"
|
$ZTST_code"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue