(file) Return to passthrough.test CVS log (file) (dir) Up to [RizwankCVS] / testProject / src / tests

 1 rizwank 1.1 #!/bin/sh
 2             #
 3             # Test pass through files.
 4             #
 5             
 6             . $srcdir/defs || exit 1
 7             
 8             cat >test_input.ps <<EOF
 9             %!
10             /Times-Roman findfont 30 scalefont setfont
11             100 100 moveto (Hi, I am a PostScript file) show
12             showpage
13             EOF
14             
15             ### test_pass_through() {
16             $enscript -G2r --quiet --pass-through -p- test_input.ps \
17               | tail +2 >$output
18             
19             result=`tail +2 test_input.ps | cmp - $output`
20             
21             if test "X$result" != "X"; then
22 rizwank 1.1   exit 1
23             fi
24             
25             rm test_input.ps
26             ### }
27             
28             echo 'D%!' | tr 'D' '\4' >test_input.ps
29             cat >>test_input.ps <<EOF
30             /Times-Roman findfont 30 scalefont setfont
31             100 100 moveto (Hi, I am a Windows damaged PostScript file) show
32             showpage
33             EOF
34             
35             ### test_pass_through() {
36             $enscript -G2r --quiet --pass-through -p- test_input.ps \
37               | tail +2 >$output
38             
39             result=`tail +2 test_input.ps | cmp - $output`
40             
41             if test "X$result" != "X"; then
42               exit 1
43 rizwank 1.1 fi
44             
45             rm test_input.ps
46             ### }
47             
48             echo '@E' | tr '@' '\33' >test_input.pcl
49             cat >>test_input.pcl <<EOF
50             This isn't really a PCL file but the magic is correct.
51             EOF
52             
53             ### test_pass_through() {
54             $enscript -G2r --quiet --pass-through -p- test_input.pcl \
55               | tail +2 >$output
56             
57             result=`tail +2 test_input.pcl | cmp - $output`
58             
59             if test "X$result" != "X"; then
60               exit 1
61             fi
62             
63             rm test_input.pcl
64 rizwank 1.1 ### }
65             
66             echo '@%' | tr '@' '\33' >test_input.pcl
67             cat >>test_input.pcl <<EOF
68             This isn't really a PCL file but the magic is correct.
69             EOF
70             
71             ### test_pass_through() {
72             $enscript -G2r --quiet --pass-through -p- test_input.pcl \
73               | tail +2 >$output
74             
75             result=`tail +2 test_input.pcl | cmp - $output`
76             
77             if test "X$result" != "X"; then
78               exit 1
79             fi
80             
81             rm test_input.pcl
82             ### }
83             
84             rm $output

Rizwan Kassim
Powered by
ViewCVS 0.9.2