about summary refs log tree commit diff
path: root/Test/A01grammar.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-03-16 09:43:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-03-16 09:43:51 +0000
commit53745d8df0a6e00d2ddf1c08f7ea71820d587673 (patch)
tree8cbc8ea34d3c9d26dcc8428b2652ac8df3f2859d /Test/A01grammar.ztst
parent1b68e0ea00deb508b394f1c0a4413205e621c293 (diff)
downloadzsh-53745d8df0a6e00d2ddf1c08f7ea71820d587673.tar.gz
zsh-53745d8df0a6e00d2ddf1c08f7ea71820d587673.tar.xz
zsh-53745d8df0a6e00d2ddf1c08f7ea71820d587673.zip
27793 and follow ups: add PATH_SCRIPT option to find script using $PATH
Diffstat (limited to 'Test/A01grammar.ztst')
-rw-r--r--Test/A01grammar.ztst18
1 files changed, 18 insertions, 0 deletions
diff --git a/Test/A01grammar.ztst b/Test/A01grammar.ztst
index 3b3f2f915..94836b4e2 100644
--- a/Test/A01grammar.ztst
+++ b/Test/A01grammar.ztst
@@ -559,3 +559,21 @@
   . ./dot_status
 0:"." file sees status from previous command
 >1
+
+  mkdir test_path_script
+  print "#!/bin/sh\necho Found the script." >test_path_script/myscript
+  chmod u+x test_path_script/myscript
+  path=($PWD/test_path_script $path)
+  export PATH
+  $ZTST_testdir/../Src/zsh -f -o pathscript myscript
+0:PATHSCRIPT option
+>Found the script.
+
+  $ZTST_testdir/../Src/zsh -f myscript
+127q:PATHSCRIPT option not used.
+?$ZTST_testdir/../Src/zsh: can't open input file: myscript
+
+  $ZTST_testdir/../Src/zsh -c 'echo $0; echo $1' myargzero myargone
+0:$0 is traditionally if bizarrely set to the first argument with -c
+>myargzero
+>myargone