~sircmpwn/ctools

ref: 16cab053e27d4a7046c005b5becae9b0564d8211 ctools/test/rmdir -rwxr-xr-x 284 bytes
16cab053 — Christopher Vittal Make test scripts POSIX compliant 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
tool="rmdir"
. "$HARNESS"

should_remove_dirs() {
	mkdir foo bar
	rmdir foo bar
	[ ! -d foo ] && [ ! -d bar ]
}

should_remove_paths() {
	mkdir -p foo/bar bar/baz
	rmdir -p foo/bar bar/baz
	[ ! -d foo ] && [ ! -d bar ]
}

runtests \
	should_remove_dirs
	should_remove_paths