From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] test harness: Emit unified diffs instead of context diffs
Date: Fri, 10 Jun 2016 17:36:55 +0000 [thread overview]
Message-ID: <1465580215-3252-1-git-send-email-danielsh@tarsus.local2> (raw)
---
Does anyone build zsh on a system that doesn't have a working 'diff -u'?
Test/ztst.zsh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index cdd84b5..8ae06b8 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -333,7 +333,7 @@ ZTST_diff() {
diff_out=$(diff "$@")
diff_ret="$?"
if [[ "$diff_ret" != "0" ]]; then
- print -r "$diff_out"
+ print -r -- "$diff_out"
fi
fi
@@ -458,7 +458,7 @@ $(<$ZTST_terr)"
rm -rf $ZTST_out
print -r -- "${(e)substlines}" >$ZTST_out
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_code${$(<$ZTST_terr):+
Error output:
@@ -470,7 +470,7 @@ $(<$ZTST_terr)}"
rm -rf $ZTST_err
print -r -- "${(e)substlines}" >$ZTST_err
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_code"
return 1
reply other threads:[~2016-06-10 17:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465580215-3252-1-git-send-email-danielsh@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).