summaryrefslogtreecommitdiffstats
path: root/pw/tests/pw_delete.sh
diff options
context:
space:
mode:
authorBrad Davis <brd@FreeBSD.org>2014-11-19 23:07:46 +0000
committerBrad Davis <brd@FreeBSD.org>2014-11-19 23:07:46 +0000
commitdb6b0912de06dd7c8a2f9749c463ad98f19c978b (patch)
tree7818d898a8f5eb513263a3fcd39e2741e6e3e39e /pw/tests/pw_delete.sh
parent04c1a8669ab01c8bb76f4cbf48aa2f8c56fa80e9 (diff)
downloadpw-darwin-db6b0912de06dd7c8a2f9749c463ad98f19c978b.tar.gz
pw-darwin-db6b0912de06dd7c8a2f9749c463ad98f19c978b.tar.zst
pw-darwin-db6b0912de06dd7c8a2f9749c463ad98f19c978b.zip
Replace the pw(1) calls with a variable, to make it easier to to change across all the tests as needed.
Reviewed by: will
Diffstat (limited to 'pw/tests/pw_delete.sh')
-rwxr-xr-xpw/tests/pw_delete.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/pw/tests/pw_delete.sh b/pw/tests/pw_delete.sh
index 02a9ade..832ec93 100755
--- a/pw/tests/pw_delete.sh
+++ b/pw/tests/pw_delete.sh
@@ -12,10 +12,10 @@ rmuser_seperate_group_head() {
}
rmuser_seperate_group_body() {
populate_etc_skel
- pw -V ${HOME} useradd test || atf_fail "Creating test user"
- pw -V ${HOME} groupmod test -M 'test,root' || \
+ ${PW} useradd test || atf_fail "Creating test user"
+ ${PW} groupmod test -M 'test,root' || \
atf_fail "Modifying the group"
- pw -V ${HOME} userdel test || atf_fail "Delete the test user"
+ ${PW} userdel test || atf_fail "Delete the test user"
}
atf_test_case group_do_not_delete_wheel_if_group_unknown
@@ -25,9 +25,9 @@ group_do_not_delete_wheel_if_group_unknown_head() {
group_do_not_delete_wheel_if_group_unknown_body() {
populate_etc_skel
- atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x pw -V ${HOME} groupshow wheel
- atf_check -e inline:"pw: -g expects a number\n" -s exit:64 -x pw -V ${HOME} groupdel -g I_do_not_exist
- atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x pw -V ${HOME} groupshow wheel
+ atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x ${PW} groupshow wheel
+ atf_check -e inline:"pw: -g expects a number\n" -s exit:64 -x ${PW} groupdel -g I_do_not_exist
+ atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x ${PW} groupshow wheel
}
atf_test_case user_do_not_try_to_delete_root_if_user_unknown
@@ -37,7 +37,7 @@ user_do_not_try_to_delete_root_if_user_unknown_head() {
user_do_not_try_to_delete_root_if_user_unknown_body() {
populate_etc_skel
- atf_check -e inline:"pw: -u expects a number\n" -s exit:64 -x pw -V ${HOME} userdel -u plop
+ atf_check -e inline:"pw: -u expects a number\n" -s exit:64 -x ${PW} userdel -u plop
}
atf_init_test_cases() {