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