• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1REQUIRES: can-execute
2
3This 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
8The PATH is constructed such that 'not' will first find a directory named
9TestProg, then a file with executable bit but not readable and finally a
10shell script which always returns false, which is what it actually tries to
11execute.
12
13If we want, it is probably OK to change the semantics of can_execute and this
14test, but for now this test serves as a reminder to audit all the callers if
15we do that.
16
17RUN: cp -f %S/Inputs/TestProg/TestProg %T/TestProg
18RUN: chmod 111 %T/TestProg
19RUN: export PATH=%S/Inputs:%T:%S/Inputs/TestProg:$PATH
20RUN: not TestProg
21