Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2009-03-26 00:09:55 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2009-03-26 00:09:55 (GMT)
commit179371d09fb0a8d683ad1544790a4f7ca95210a1 (patch)
treec68121397520262b1cf2514cfde5c71a7d41143b /test
parenta6774df520bc2a2e3c747cb1dfca797608499a04 (diff)
Added a test to check printing and a size of the file.
2009-03-26 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * test/Makefile.am: * test/test6.py: Added a test to check printing and a size of the file. svn path=/trunk/; revision=3560
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am3
-rwxr-xr-xtest/test6.py29
2 files changed, 31 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index aa562d3..8274877 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -4,7 +4,8 @@ dist_check_SCRIPTS = \
test2.py \
test3.py \
test4.py \
- test5.py
+ test5.py \
+ test6.py
TESTS = $(dist_check_SCRIPTS)
diff --git a/test/test6.py b/test/test6.py
new file mode 100755
index 0000000..9ffcfae
--- /dev/null
+++ b/test/test6.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python
+
+# Test printing
+
+import os
+os.environ['LANG']='C'
+srcdir = os.environ['srcdir']
+
+from dogtail.procedural import *
+
+os.unlink("output.ps")
+
+run('evince', arguments=' '+srcdir+'/test-page-labels.pdf')
+
+click('File', roleName='menu')
+click('Print...', roleName='menu item')
+
+focus.dialog('Print')
+click('Print to File', roleName='table cell', raw=True)
+click('Print', roleName='push button')
+
+statinfo = os.stat ("output.ps")
+if statinfo.st_size > 100000:
+ exit(1)
+os.unlink ("output.ps")
+
+# Close evince
+click('File', roleName='menu')
+click('Close', roleName='menu item')