From a5efa210b291630d838878b8d5e7d2ab0bf8b384 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Thu, 23 Mar 2017 03:28:24 +0000 Subject: Rename tests from to _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 --- pw/tests/pw_etcdir_test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 pw/tests/pw_etcdir_test.sh (limited to 'pw/tests/pw_etcdir_test.sh') diff --git a/pw/tests/pw_etcdir_test.sh b/pw/tests/pw_etcdir_test.sh new file mode 100755 index 0000000..b237789 --- /dev/null +++ b/pw/tests/pw_etcdir_test.sh @@ -0,0 +1,18 @@ +# $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 +} + -- cgit v1.2.3