]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - usr.sbin/pw/tests/pw_groupadd.sh
- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
[FreeBSD/releng/10.3.git] / usr.sbin / pw / tests / pw_groupadd.sh
1 # $FreeBSD$
2
3 # Import helper functions
4 . $(atf_get_srcdir)/helper_functions.shin
5
6 atf_test_case group_add_gid_too_large
7 group_add_gid_too_large_body() {
8         populate_etc_skel
9         atf_check -s exit:64 -e inline:"pw: Bad id '9999999999999': too large\n" \
10                 ${PW} groupadd -n test1 -g 9999999999999
11 }
12
13 atf_test_case group_add_already_exists
14 group_add_already_exists_body() {
15         populate_etc_skel
16
17         atf_check -s exit:0 ${PW} groupadd foo
18         atf_check -s exit:65 \
19                 -e inline:"pw: group name \`foo' already exists\n" \
20                 ${PW} groupadd foo
21 }
22
23 atf_init_test_cases() {
24         atf_add_test_case group_add_gid_too_large
25         atf_add_test_case group_add_already_exists
26 }