2 testname="$(basename $0)"
4 parent="$(cd .. && pwd)"
5 if [ -f "${parent}/ftsfind" ]; then
6 ftsfind="${parent}/ftsfind"
7 oldfind="${parent}/find"
8 elif [ -f "${parent}/oldfind" ]; then
9 ftsfind="${parent}/find"
10 oldfind="${parent}/oldfind"
12 echo "Cannot find the executables to test." >&2
15 if tstdir=$(mktemp -d); then
18 for executable in "$oldfind" "$ftsfind"; do
19 if result=$("$executable" "$tstdir" -name '[' -print); then
20 if ! [ "$result" = "$expected" ]; then
21 echo "FAIL: $testname with $executable returned '$result' but '$expected' was expected" >&2
25 echo "FAIL: $executable returned $?" >&2
31 echo "FAIL: could not create a test directory." >&2