summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-05-19 19:26:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2022-05-19 19:26:54 +0000
commitb282b7b5d82892a9cf717e9e0951088035462ae4 (patch)
treed846f4187eb68aa5d07105921d10f1829a275a85 /tests
parent41a5ddd15079bf0f75100335bb163ba629b70eae (diff)
downloadalpine-conf-b282b7b5d82892a9cf717e9e0951088035462ae4.zip
tests: add test for setup-user with a single name
Diffstat (limited to 'tests')
-rwxr-xr-xtests/setup_user_test14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/setup_user_test b/tests/setup_user_test
index 03660b9..e2f358c 100755
--- a/tests/setup_user_test
+++ b/tests/setup_user_test
@@ -6,6 +6,7 @@ init_tests \
setup_user_fullname \
setup_user_interactive \
setup_user_interactive_fullname \
+ setup_user_interactive_singlename \
setup_user_groups_commas \
setup_user_groups_spaces
@@ -58,6 +59,19 @@ setup_user_interactive_fullname_body() {
setup-user -f "Joe User" -k none
}
+setup_user_interactive_singlename_body() {
+ init_env
+ (
+ echo ""
+ ) | atf_check -s exit:0 \
+ -o not-match:"Enter full name" \
+ -o match:"Enter username.*[joe]" \
+ -o not-match:"adduser.* -D .*" \
+ -o match:"adduser.* -g Joe .*joe" \
+ -e empty \
+ setup-user -f "Joe" -k none
+}
+
setup_user_groups_commas_body() {
init_env
atf_check -s exit:0 \