diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-19 19:26:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-19 19:26:54 +0000 |
commit | b282b7b5d82892a9cf717e9e0951088035462ae4 (patch) | |
tree | d846f4187eb68aa5d07105921d10f1829a275a85 /tests | |
parent | 41a5ddd15079bf0f75100335bb163ba629b70eae (diff) | |
download | alpine-conf-b282b7b5d82892a9cf717e9e0951088035462ae4.zip |
tests: add test for setup-user with a single name
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/setup_user_test | 14 |
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 \ |