~willismonroe/ubuntu/precise/xdg-utils/typo-fix-996304

« back to all changes in this revision

Viewing changes to tests/xdg-screensaver/t.10-screensave_activate

  • Committer: Bazaar Package Importer
  • Author(s): Per Olofsson
  • Date: 2006-08-29 17:35:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060829173502-ffe063dqe8ajg2rm
Tags: upstream-1.0~beta3
ImportĀ upstreamĀ versionĀ 1.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_activate() {
 
9
test_start "$FUNCNAME: verify screensaver activate"
 
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 "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."
 
22
 
 
23
assert_exit 0 xdg-screensaver status
 
24
assert_stdout
 
25
 
 
26
mv out.stdout out.stat
 
27
 
 
28
sleep 1
 
29
 
 
30
assert_exit 0 xdg-screensaver activate
 
31
assert_nostdout
 
32
assert_nostderr
 
33
 
 
34
assert_interactive "Did the screensaver activate?" y
 
35
assert_interactive "Were you required to enter your password to de-activate it?" "$USEPASSWD"
 
36
 
 
37
assert_exit 0 xdg-screensaver status
 
38
assert_stdout out.stat
 
39
 
 
40
test_result
 
41
}
 
42
 
 
43
run_test test_screensave_activate