3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
8 testing "rmdir" "rmdir one && [ ! -d one ] && echo yes" "yes\n" "" ""
12 "rmdir walrus 2> /dev/null || [ -f walrus ] && echo yes" "yes\n" "" ""
16 "rmdir one two 2> /dev/null && [ ! -d one ] && [ ! -d two ] && echo yes" \
20 testing "one missing two file three" \
21 "rmdir one missing two walrus three 2> /dev/null || [ ! -d three ] && echo yes" \
27 testing "mode 000" "rmdir one && [ ! -d one ] && echo yes" "yes\n" "" ""
32 "rmdir temp 2>/dev/null || [ -d temp ] && echo yes" "yes\n" "" ""
33 testing "-p dir/file" \
34 "rmdir -p temp/thing 2>/dev/null || [ -f temp/thing ] && echo yes" \
37 mkdir -p temp/one/two/three
38 testing "-p part of path" \
39 "rmdir -p temp/one/two/three 2>/dev/null || [ -d temp ] && [ ! -e temp/one ] && echo yes" \
44 mkdir -p one/two/three
45 testing "-p one/two/three" \
46 "rmdir -p one/two/three && [ ! -e one ] && echo yes" "yes\n" "" ""
48 mkdir -p one/two/three
49 testing "-p one/two/three/" \
50 "rmdir -p one/two/three/ && [ ! -e one ] && echo yes" "yes\n" "" ""
52 #mkdir -p one/two/three
53 #chmod 000 one/two/three one/two one
54 #testing "-p one/two/three" \
55 # "rmdir -p one/two/three && [ ! -e one ] && echo yes" "yes\n" "" ""