Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: A05 test failure: bad interpreter: x*xn



On Thu, 13 Sep 2018 23:04:13 -0500
Matthew Martin <phy1729@xxxxxxxxx> wrote:
> When running tests on OpenBSD A05 fails with the below message. It seems
> to be testing for an OS dependant error string and exit code.

Yes, that's not going to work.  I missed that.

Let's just stick with non-zero status.

pws

diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index 567bd25..5d3d460 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -52,12 +52,17 @@
 0:path (4)
 *>foo */command.tmp/tstcmd-arg
 
-  path=($shpath $echopath ${ZTST_testdir}/command.tmp/)
-  tstcmd-interp-too-long 2>&1; echo "status $?"
-  path=($storepath)
-0:path (5)
-*>*tstcmd-interp-too-long: bad interpreter: x*xn: no such file or directory
->status 127
+  # Just check this exits with non-zero status,
+  # as output and status code can differ.
+  (
+    path=($shpath $echopath ${ZTST_testdir}/command.tmp/)
+    if tstcmd-interp-too-long >/dev/null 2>&1; then
+      exit 0
+    else
+      exit 1
+    fi
+  )
+1:path (5)
 
   functst() { print $# arguments:; print -l $*; }
   functst "Eines Morgens" "als Gregor Samsa"



Messages sorted by: Reverse Date, Date, Thread, Author