]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
75bd9771 | 3 | # "$Id: 5.5-lp.sh 7415 2008-03-31 22:33:20Z mike $" |
ef416fc2 | 4 | # |
5 | # Test the lp command. | |
6 | # | |
839a51c8 | 7 | # Copyright 2007-2008 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 "LP Default Test" | |
18 | echo "" | |
839a51c8 MS |
19 | echo " lp testfile.pdf" |
20 | ../systemv/lp 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 "LP Destination Test" | |
30 | echo "" | |
839a51c8 MS |
31 | echo " lp -d Test2 testfile.jpg" |
32 | ../systemv/lp -d Test2 testfile.jpg 2>&1 | |
33 | if test $? != 0; then | |
34 | echo " FAILED" | |
35 | exit 1 | |
36 | else | |
37 | echo " PASSED" | |
38 | fi | |
39 | echo "" | |
40 | ||
41 | echo "LP Options Test" | |
42 | echo "" | |
43 | echo " lp -d Test1 -P 1-4 -o job-sheets=classified,classified testfile.pdf" | |
44 | ../systemv/lp -d Test1 -P 1-4 -o job-sheets=classified,classified 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 "LP Flood Test ($1 times in parallel)" |
ef416fc2 | 54 | echo "" |
839a51c8 MS |
55 | echo " lp -d Test1 testfile.jpg" |
56 | echo " lp -d Test2 testfile.jpg" | |
ef416fc2 | 57 | i=0 |
58 | while test $i -lt $1; do | |
59 | echo " flood copy $i..." 1>&2 | |
60 | ../systemv/lp -d Test1 testfile.jpg 2>&1 & | |
839a51c8 | 61 | ../systemv/lp -d Test2 testfile.jpg 2>&1 & |
ef416fc2 | 62 | lppid=$! |
63 | i=`expr $i + 1` | |
64 | done | |
65 | wait $lppid | |
66 | if test $? != 0; then | |
67 | echo " FAILED" | |
68 | exit 1 | |
69 | else | |
70 | echo " PASSED" | |
71 | fi | |
72 | echo "" | |
73 | ||
839a51c8 MS |
74 | ./waitjobs.sh |
75 | ||
ef416fc2 | 76 | # |
75bd9771 | 77 | # End of "$Id: 5.5-lp.sh 7415 2008-03-31 22:33:20Z mike $". |
ef416fc2 | 78 | # |