xref: /freebsd/usr.sbin/pw/tests/pw_etcdir_test.sh (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1# $FreeBSD$
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