From 53745d8df0a6e00d2ddf1c08f7ea71820d587673 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 16 Mar 2010 09:43:51 +0000 Subject: 27793 and follow ups: add PATH_SCRIPT option to find script using $PATH --- Test/A01grammar.ztst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Test') 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 -- cgit v1.2.3-70-g09d2