File: execdir-pwd1.exp

package info (click to toggle)
findutils 4.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 26,108 kB
  • sloc: ansic: 126,635; sh: 11,486; yacc: 1,852; makefile: 844; exp: 839; python: 66; sed: 16
file content (20 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# tests for working directory of -execdir {} \;
if { [ safe_path ] } {
    global SKIP_OLD

    exec rm -rf tmp
    exec mkdir tmp

    # Create an empty shell script.
    exec touch    tmp/foo
    exec chmod +x tmp/foo

    # The -execdir should find the "foo" in the current directory.
    # If not, the find command is probably executing the command
    # built up by -execdir in the wrong directory.

    set SKIP_OLD 1
    find_start p {tmp -name foo -execdir sh ./foo  \{\} \; } ""
    set SKIP_OLD 0
    exec rm -rf tmp
}