freebsd-skq/usr.sbin/pw/tests/pw_etcdir_test.sh
Enji Cooper 458cbf0ae6 Rename tests from <foo> to <foo>_test to match the FreeBSD test suite
naming scheme

usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test
to avoid collisions with the renamed FreeBSD test.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-03-23 03:28:24 +00:00

19 lines
484 B
Bash
Executable File

# $FreeBSD$
# When the '-V directory' option is provided, the directory must exist
atf_test_case etcdir_must_exist
etcdir_must_exist_head() {
atf_set "descr" "When the '-V directory' option is provided, the directory must exist"
}
etcdir_must_exist_body() {
local fakedir="/this_directory_does_not_exist"
atf_check -e inline:"pw: no such directory \`$fakedir'\n" \
-s exit:72 -x pw -V ${fakedir} usershow root
}
atf_init_test_cases() {
atf_add_test_case etcdir_must_exist
}