diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-03-25 10:47:58 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2017-03-25 10:47:58 +0000 |
commit | 7a67158d34a8507c25611e970805df0f1126592f (patch) | |
tree | e2016fa7eeb929c84926deb5f93c051bba7fec89 /pw/tests/pw_useradd_test.sh | |
parent | d6769f761ad094ca0b1f70437c517eca53fae8a6 (diff) | |
download | pw-darwin-7a67158d34a8507c25611e970805df0f1126592f.tar.gz pw-darwin-7a67158d34a8507c25611e970805df0f1126592f.tar.zst pw-darwin-7a67158d34a8507c25611e970805df0f1126592f.zip |
Add a regression test for r31512 fix
PR: 217934
MFC after: 1 week
Diffstat (limited to 'pw/tests/pw_useradd_test.sh')
-rwxr-xr-x | pw/tests/pw_useradd_test.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pw/tests/pw_useradd_test.sh b/pw/tests/pw_useradd_test.sh index b1ff8d4..d14e4dd 100755 --- a/pw/tests/pw_useradd_test.sh +++ b/pw/tests/pw_useradd_test.sh @@ -384,6 +384,19 @@ user_add_with_pw_conf_body() atf_check -s exit:0 \ ${PW} useradd foo -C ${HOME}/pw.conf } +atf_test_case user_add_defaultgroup +user_add_defaultgroup_body() +{ + populate_etc_skel + echo 'defaultgroup = "plop"' > ${HOME}/pw.conf + atf_check -s exit:0 \ + ${PW} groupadd plop -g 442 + atf_check -s exit:0 \ + ${PW} useradd foo -C ${HOME}/pw.conf + atf_check -s exit:0 \ + -o inline:"foo:*:1001:442::0:0:User &:/home/foo:/bin/sh\n" \ + ${PW} usershow foo +} atf_init_test_cases() { atf_add_test_case user_add @@ -419,4 +432,5 @@ atf_init_test_cases() { atf_add_test_case user_add_w_random atf_add_test_case user_add_w_yes atf_add_test_case user_add_with_pw_conf + atf_add_test_case user_add_defaultgroup } |