about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2018-09-14 09:19:19 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2018-09-14 09:22:08 +0100
commit10568271944f2b304bded6a07f9ea2953d5e4dc1 (patch)
tree2eafb57904b2a4e5891e6dc44fd12ef51b989d55
parent24bb4655662a0cb0e9dd0a54637905007c5b98aa (diff)
downloadzsh-10568271944f2b304bded6a07f9ea2953d5e4dc1.tar.gz
zsh-10568271944f2b304bded6a07f9ea2953d5e4dc1.tar.xz
zsh-10568271944f2b304bded6a07f9ea2953d5e4dc1.zip
43466: Make path(5) test more generic.
Only test non-zero status as OS error codes and messages vary.
-rw-r--r--ChangeLog5
-rw-r--r--Test/A05execution.ztst17
2 files changed, 16 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d2cd80db..da9ea92ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-14  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 43466: Test/A05execution.ztst: path(5) test is too specific as
+	OS codes and messages may vary.
+
 2018-09-12  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* unposted: Completion/Unix/Command/_subversion: _svn: Complete
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index 567bd2530..5d3d460df 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"