From 6c4600fad1456d0ed5e8aeb976ef717bf821e879 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 14 Aug 2015 13:39:55 +0000 Subject: Regression: fix pw usermod -w xxx Reported by: gjb --- pw/tests/pw_useradd.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pw/tests/pw_useradd.sh') diff --git a/pw/tests/pw_useradd.sh b/pw/tests/pw_useradd.sh index 2ac31c9..f126bf0 100755 --- a/pw/tests/pw_useradd.sh +++ b/pw/tests/pw_useradd.sh @@ -314,6 +314,19 @@ user_add_already_exists_body() { ${PW} useradd foo } +atf_test_case user_add_w_yes +user_add_w_yes_body() { + populate_etc_skel + atf_check -s exit:0 ${PW} useradd foo -w yes + atf_check -s exit:0 \ + -o match:'^foo:\$.*' \ + grep "^foo" ${HOME}/master.passwd + atf_check -s exit:0 ${PW} usermod foo -w yes + atf_check -s exit:0 \ + -o match:'^foo:\$.*' \ + grep "^foo" ${HOME}/master.passwd +} + atf_init_test_cases() { atf_add_test_case user_add atf_add_test_case user_add_noupdate @@ -341,4 +354,5 @@ atf_init_test_cases() { atf_add_test_case user_add_uid_too_large atf_add_test_case user_add_bad_shell atf_add_test_case user_add_already_exists + atf_add_test_case user_add_w_yes } -- cgit v1.2.3-56-ge451