3
## Include utility functions.
4
. "$XDG_TEST_DIR/include/testassertions.sh"
5
. "$XDG_TEST_DIR/include/testcontrol.sh"
8
test_screensave_activate() {
9
test_start "$FUNCNAME: verify screensaver activate"
15
## Require a running X server
20
assert_interactive "Do you normally need to enter your password to de-activate the screensaver?" s USEPASSWD
21
assert_interactive "I will activate the screensaver 1 second after you press enter. Please press shift after it does."
23
assert_exit 0 xdg-screensaver status
26
mv out.stdout out.stat
30
assert_exit 0 xdg-screensaver activate
34
assert_interactive "Did the screensaver activate?" y
35
assert_interactive "Were you required to enter your password to de-activate it?" "$USEPASSWD"
37
assert_exit 0 xdg-screensaver status
38
assert_stdout out.stat
43
run_test test_screensave_activate