blob: fe136904b806a59131dd4ab92a7a0ca860f82819 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env atf-sh
. $(atf_get_srcdir)/test_env.sh
init_tests \
fake_adduser_usage \
fake_adduser_failure
fake_adduser_usage_body() {
init_env
atf_check -s exit:0 \
-e match:"Usage: adduser" \
adduser --help
}
fake_adduser_failure_body() {
init_env
ADDUSER_EXIST=juser atf_check -s exit:1 \
-e match:"adduser: user 'juser' in use" \
adduser juser
}
|