OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 ## Include utility functions. |
| 4 . "$XDG_TEST_DIR/include/testassertions.sh" |
| 5 . "$XDG_TEST_DIR/include/testcontrol.sh" |
| 6 |
| 7 ## Test function |
| 8 test_screensave_lock() { |
| 9 test_start "$FUNCNAME: verify screensaver lock" |
| 10 |
| 11 test_init |
| 12 |
| 13 require_notroot |
| 14 require_interactive |
| 15 ## Require a running X server |
| 16 assert_display |
| 17 |
| 18 test_procedure |
| 19 |
| 20 assert_interactive "I will lock the screensaver 1 second after you press enter.
Please press shift after it does." |
| 21 |
| 22 assert_exit 0 xdg-screensaver status |
| 23 assert_stdout |
| 24 |
| 25 mv out.stdout out.stat |
| 26 |
| 27 sleep 1 |
| 28 |
| 29 assert_exit 0 xdg-screensaver lock |
| 30 assert_nostdout |
| 31 assert_nostderr |
| 32 |
| 33 sleep 1 |
| 34 |
| 35 assert_interactive "Did the screensaver activate?" y |
| 36 assert_interactive "Were you required to enter your password to de-activate it?"
y |
| 37 |
| 38 assert_exit 0 xdg-screensaver status |
| 39 assert_stdout out.stat |
| 40 |
| 41 test_result |
| 42 } |
| 43 |
| 44 run_test test_screensave_lock |
OLD | NEW |