3 # Import helper functions
4 . $(atf_get_srcdir)/helper_functions.shin
6 atf_test_case group_show_all
7 group_show_all_body() {
9 atf_check -o not-empty ${PW} groupshow -a
12 atf_test_case group_show_gid
13 group_show_gid_body() {
15 atf_check -o not-empty ${PW} groupshow -g 0
18 atf_test_case group_show_name
19 group_show_name_body() {
21 atf_check -o not-empty ${PW} groupshow wheel
24 atf_test_case group_show_nonexistent_gid
25 group_show_nonexistent_gid_body() {
29 no_such_name_msg="pw: unknown gid \`$nonexistent_gid'\n"
31 atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \
33 atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \
37 atf_test_case group_show_nonexistent_name
38 group_show_nonexistent_name_body() {
41 nonexistent_name=bogus
42 no_such_name_msg="pw: unknown group \`$nonexistent_name'\n"
44 atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \
46 atf_check -e "inline:$no_such_name_msg" -s exit:65 ${PW} groupshow \
50 atf_init_test_cases() {
51 atf_add_test_case group_show_all
52 atf_add_test_case group_show_gid
53 atf_add_test_case group_show_name
54 atf_add_test_case group_show_nonexistent_gid
55 atf_add_test_case group_show_nonexistent_name