summaryrefslogtreecommitdiffstats
path: root/pw/tests
diff options
context:
space:
mode:
Diffstat (limited to 'pw/tests')
-rwxr-xr-xpw/tests/pw_useradd.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/pw/tests/pw_useradd.sh b/pw/tests/pw_useradd.sh
index 32d3b9d..469c1e5 100755
--- a/pw/tests/pw_useradd.sh
+++ b/pw/tests/pw_useradd.sh
@@ -231,6 +231,15 @@ user_add_invalid_group_entry_body() {
atf_check -s exit:1 -e match:"Invalid group entry" ${PW} useradd foo2
}
+atf_test_case user_add_password_from_h
+user_add_password_from_h_body() {
+ populate_etc_skel
+
+ atf_check -s exit:0 ${PW} useradd test -h 0 <<-EOF
+ $(echo test)
+ EOF
+}
+
atf_init_test_cases() {
atf_add_test_case user_add
atf_add_test_case user_add_noupdate
@@ -251,4 +260,5 @@ atf_init_test_cases() {
atf_add_test_case user_add_expiration
atf_add_test_case user_add_invalid_user_entry
atf_add_test_case user_add_invalid_group_entry
+ atf_add_test_case user_add_password_from_h
}