~sircmpwn/ctools

ref: cc69324393fda9bcbc73d30d1bda022263f012a8 ctools/test/rmdir -rwxr-xr-x 284 bytes
cc693243 — Gabor Koszegi Correct tee SIGINT test 1 year, 11 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