zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Peter Stephenson" <pws@cambridgesiliconradio.com>,
	"Zsh hackers list" <zsh-workers@sunsite.auc.dk>
Subject: RE: Output of 'make check'
Date: Thu, 1 Jun 2000 17:03:39 +0400	[thread overview]
Message-ID: <000001bfcbc9$ce422690$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <0FVG001HSZXA60@la-la.cambridgesiliconradio.com>

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

>
> > I do not particular like it. It outputs thousands of "No differences
> > encountered", that will scroll away any useful output. So,
> if any test
> > in between fails, there is no chance to see it unfortunately (there
> > seems to be no log by default). I just noticed, that one more test
> > failed - and it was only by accident.
>
> That's coming from your version of diff, not the test
> harness.  If you can
> find a portable way of suppressing it without removing the
> useful output, I
> will add it --- it may simply be a case of 2>/dev/null.
>

What about attached patch? (2>/dev/null does not work, diff outputs on
stdout).

Can we rely on the fact, that $? is set to exit code of command
substitution?

-andrej

[-- Attachment #2: ztst.diff --]
[-- Type: application/octet-stream, Size: 1043 bytes --]

--- Test/ztst.zsh.org	Wed May  3 13:24:47 2000
+++ Test/ztst.zsh	Thu Jun  1 16:54:31 2000
@@ -219,6 +219,19 @@
   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() {
   local last match mbegin mend found
 
@@ -297,13 +310,13 @@
 $(<$ZTST_terr)"
 
       # 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_code${$(<$ZTST_terr):+
 Error output:
 $(<$ZTST_terr)}"
       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_code"
       fi

  reply	other threads:[~2000-06-01 13:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-01  9:28 Andrej Borsenkow
2000-06-01 10:03 ` Peter Stephenson
2000-06-01 13:03   ` Andrej Borsenkow [this message]
2000-06-01 14:21     ` Bart Schaefer
2000-06-01 14:52     ` Peter Stephenson
2000-06-01 14:20   ` test failuer case Bart Schaefer
2000-06-01  9:29 Andrej Borsenkow

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='000001bfcbc9$ce422690$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=pws@cambridgesiliconradio.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).