]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - usr.sbin/pw/tests/pw_etcdir.sh
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / usr.sbin / pw / tests / pw_etcdir.sh
1 # $FreeBSD$
2
3 # When the '-V directory' option is provided, the directory must exist
4 atf_test_case etcdir_must_exist
5 etcdir_must_exist_head() {
6         atf_set "descr" "When the '-V directory' option is provided, the directory must exist"
7 }
8
9 etcdir_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
15 atf_init_test_cases() {
16         atf_add_test_case etcdir_must_exist
17 }
18