mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-14 14:01:18 +02:00
38652: test harness: Emit unified diffs instead of context diffs
This commit is contained in:
parent
76f28cc908
commit
14dbc20b02
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2016-06-25 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||||
|
|
||||||
|
* 38652: Test/ztst.zsh: test harness: Emit unified diffs instead
|
||||||
|
of context diffs
|
||||||
|
|
||||||
2016-06-22 Oliver Kiddle <opk@zsh.org>
|
2016-06-22 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
* 38749: Functions/Zle/surround, Functions/Zle/select-bracketed:
|
* 38749: Functions/Zle/surround, Functions/Zle/select-bracketed:
|
||||||
|
|
|
@ -333,7 +333,7 @@ ZTST_diff() {
|
||||||
diff_out=$(diff "$@")
|
diff_out=$(diff "$@")
|
||||||
diff_ret="$?"
|
diff_ret="$?"
|
||||||
if [[ "$diff_ret" != "0" ]]; then
|
if [[ "$diff_ret" != "0" ]]; then
|
||||||
print -r "$diff_out"
|
print -r -- "$diff_out"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ $(<$ZTST_terr)"
|
||||||
rm -rf $ZTST_out
|
rm -rf $ZTST_out
|
||||||
print -r -- "${(e)substlines}" >$ZTST_out
|
print -r -- "${(e)substlines}" >$ZTST_out
|
||||||
fi
|
fi
|
||||||
if [[ $ZTST_flags != *d* ]] && ! ZTST_diff $diff_out -c $ZTST_out $ZTST_tout; then
|
if [[ $ZTST_flags != *d* ]] && ! ZTST_diff $diff_out -u $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:
|
||||||
|
@ -470,7 +470,7 @@ $(<$ZTST_terr)}"
|
||||||
rm -rf $ZTST_err
|
rm -rf $ZTST_err
|
||||||
print -r -- "${(e)substlines}" >$ZTST_err
|
print -r -- "${(e)substlines}" >$ZTST_err
|
||||||
fi
|
fi
|
||||||
if [[ $ZTST_flags != *D* ]] && ! ZTST_diff $diff_err -c $ZTST_err $ZTST_terr; then
|
if [[ $ZTST_flags != *D* ]] && ! ZTST_diff $diff_err -u $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"
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in a new issue