diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-10-28 16:27:29 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-10-28 16:27:29 +0000 |
commit | 6e6c53f0631dd6cb611a65dbf7f025ca90b0ff32 (patch) | |
tree | e55a4b8026f5857e61c94009c393edc95b3323b2 /usr.sbin/pw/tests | |
parent | 1561b87885e941b76158e87b279be400a003b4b4 (diff) | |
download | src-6e6c53f0631dd6cb611a65dbf7f025ca90b0ff32.tar.gz src-6e6c53f0631dd6cb611a65dbf7f025ca90b0ff32.zip |
Notes
Diffstat (limited to 'usr.sbin/pw/tests')
-rwxr-xr-x | usr.sbin/pw/tests/pw_modify.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr.sbin/pw/tests/pw_modify.sh b/usr.sbin/pw/tests/pw_modify.sh index 5888111933ea..b81f105d92be 100755 --- a/usr.sbin/pw/tests/pw_modify.sh +++ b/usr.sbin/pw/tests/pw_modify.sh @@ -58,9 +58,23 @@ usermod_bug_185666_body() { atf_check -o inline:"testgroup2:*:1003:testuser\n" -x pw -V ${HOME} groupshow testgroup2 } +atf_test_case do_not_duplicate_group_on_gid_change +do_not_duplicate_group_on_gid_change_head() { + atf_set "descr" "Do not duplicate group on gid change" +} + +do_not_duplicate_group_on_gid_change_body() { + populate_etc_skel + atf_check -s exit:0 -x pw -V ${HOME} groupadd testgroup + atf_check -s exit:0 -x pw -V ${HOME} groupmod testgroup -g 12345 + # use grep to see if the entry has not be duplicated + atf_check -o inline:"testgroup:*:12345:\n" -s exit:0 -x grep "^testgroup" ${HOME}/group +} + atf_init_test_cases() { atf_add_test_case groupmod_user atf_add_test_case groupmod_invalid_user atf_add_test_case groupmod_bug_193704 atf_add_test_case usermod_bug_185666 + atf_add_test_case do_not_duplicate_group_on_gid_change } |