4 This tests that we abstract two peculiarities of unix in can_execute:
6 * Directories are executable, but we don't want to try to execute them.
7 * For shell scripts, we also need to be able to read them.
9 The PATH is constructed such that 'not' will first find a directory named
10 TestProg, then a file with executable bit but not readable and finally a
11 shell script which always returns false, which is what it actually tries to
14 If we want, it is probably OK to change the semantics of can_execute and this
15 test, but for now this test serves as a reminder to audit all the callers if
18 RUN: rm -rf %t && mkdir -p %t
19 RUN: cp -f %S/Inputs/TestProg/TestProg %t/TestProg
20 RUN: chmod 111 %t/TestProg
21 RUN: export PATH=%S/Inputs:%t:%S/Inputs/TestProg:$PATH