pw_etcdir_test.sh revision 316257
1# $FreeBSD: stable/10/usr.sbin/pw/tests/pw_etcdir_test.sh 316257 2017-03-30 06:20:58Z ngie $
2
3# When the '-V directory' option is provided, the directory must exist
4atf_test_case etcdir_must_exist
5etcdir_must_exist_head() {
6	atf_set "descr" "When the '-V directory' option is provided, the directory must exist"
7}
8
9etcdir_must_exist_body() {
10	local fakedir="/this_directory_does_not_exist"
11	atf_check -e inline:"pw: no such directory \`$fakedir'\n" \
12		-s exit:72 -x pw -V ${fakedir} usershow root
13}
14
15atf_init_test_cases() {
16	atf_add_test_case etcdir_must_exist
17}
18
19