]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
1a18c85c | 3 | # "$Id: 5.6-lpr.sh 12065 2014-07-30 17:56:35Z msweet $" |
ef416fc2 | 4 | # |
5 | # Test the lpr command. | |
6 | # | |
1a18c85c | 7 | # Copyright 2007-2014 by Apple Inc. |
ef416fc2 | 8 | # Copyright 1997-2005 by Easy Software Products, all rights reserved. |
9 | # | |
10 | # These coded instructions, statements, and computer programs are the | |
bc44d920 | 11 | # property of Apple Inc. and are protected by Federal copyright |
12 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
13 | # which should have been included with this file. If this file is | |
14 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 15 | # |
16 | ||
17 | echo "LPR Default Test" | |
18 | echo "" | |
839a51c8 | 19 | echo " lpr testfile.pdf" |
a2326b5b | 20 | $VALGRIND ../berkeley/lpr testfile.pdf 2>&1 |
ef416fc2 | 21 | if test $? != 0; then |
22 | echo " FAILED" | |
23 | exit 1 | |
24 | else | |
25 | echo " PASSED" | |
26 | fi | |
27 | echo "" | |
28 | ||
29 | echo "LPR Destination Test" | |
30 | echo "" | |
a29fd7dd MS |
31 | echo " lpr -P Test3 -o fit-to-page testfile.jpg" |
32 | $VALGRIND ../berkeley/lpr -P Test3 -o fit-to-page testfile.jpg 2>&1 | |
839a51c8 MS |
33 | if test $? != 0; then |
34 | echo " FAILED" | |
35 | exit 1 | |
36 | else | |
37 | echo " PASSED" | |
38 | fi | |
39 | echo "" | |
40 | ||
41 | echo "LPR Options Test" | |
42 | echo "" | |
43 | echo " lpr -P Test1 -o number-up=4 -o job-sheets=standard,none testfile.pdf" | |
a2326b5b | 44 | $VALGRIND ../berkeley/lpr -P Test1 -o number-up=4 -o job-sheets=standard,none testfile.pdf 2>&1 |
ef416fc2 | 45 | if test $? != 0; then |
46 | echo " FAILED" | |
47 | exit 1 | |
48 | else | |
49 | echo " PASSED" | |
50 | fi | |
51 | echo "" | |
52 | ||
839a51c8 | 53 | echo "LPR Flood Test ($1 times in parallel)" |
ef416fc2 | 54 | echo "" |
839a51c8 MS |
55 | echo " lpr -P Test1 testfile.jpg" |
56 | echo " lpr -P Test2 testfile.jpg" | |
ef416fc2 | 57 | i=0 |
1a18c85c | 58 | pids="" |
ef416fc2 | 59 | while test $i -lt $1; do |
b9faaae1 MS |
60 | j=1 |
61 | while test $j -le $2; do | |
a2326b5b | 62 | $VALGRIND ../berkeley/lpr -P test-$j testfile.jpg 2>&1 |
b9faaae1 MS |
63 | j=`expr $j + 1` |
64 | done | |
65 | ||
a2326b5b | 66 | $VALGRIND ../berkeley/lpr -P Test1 testfile.jpg 2>&1 & |
1a18c85c | 67 | pids="$pids $!" |
a2326b5b | 68 | $VALGRIND ../berkeley/lpr -P Test2 testfile.jpg 2>&1 & |
1a18c85c | 69 | pids="$pids $!" |
b9faaae1 | 70 | |
ef416fc2 | 71 | i=`expr $i + 1` |
72 | done | |
1a18c85c | 73 | wait $pids |
ef416fc2 | 74 | if test $? != 0; then |
75 | echo " FAILED" | |
76 | exit 1 | |
77 | else | |
78 | echo " PASSED" | |
79 | fi | |
80 | echo "" | |
81 | ||
839a51c8 MS |
82 | ./waitjobs.sh |
83 | ||
ef416fc2 | 84 | # |
1a18c85c | 85 | # End of "$Id: 5.6-lpr.sh 12065 2014-07-30 17:56:35Z msweet $". |
ef416fc2 | 86 | # |