]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
1a18c85c | 3 | # "$Id: 5.1-lpadmin.sh 11398 2013-11-06 20:11:11Z msweet $" |
ef416fc2 | 4 | # |
1a18c85c | 5 | # Test the lpadmin command. |
ef416fc2 | 6 | # |
1a18c85c MS |
7 | # Copyright 2007-2013 by Apple Inc. |
8 | # Copyright 1997-2005 by Easy Software Products, all rights reserved. | |
ef416fc2 | 9 | # |
1a18c85c MS |
10 | # These coded instructions, statements, and computer programs are the |
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 "Add Printer Test" | |
18 | echo "" | |
d1c13e16 | 19 | echo " lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd" |
a2326b5b | 20 | $VALGRIND ../systemv/lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd 2>&1 |
ef416fc2 | 21 | if test $? != 0; then |
22 | echo " FAILED" | |
23 | exit 1 | |
24 | else | |
1a18c85c MS |
25 | if test -f $CUPS_SERVERROOT/ppd/Test3.ppd; then |
26 | echo " PASSED" | |
27 | else | |
28 | echo " FAILED (No PPD)" | |
29 | exit 1 | |
30 | fi | |
ef416fc2 | 31 | fi |
32 | echo "" | |
33 | ||
34 | echo "Modify Printer Test" | |
35 | echo "" | |
36 | echo " lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4" | |
a2326b5b | 37 | $VALGRIND ../systemv/lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4 2>&1 |
ef416fc2 | 38 | if test $? != 0; then |
39 | echo " FAILED" | |
40 | exit 1 | |
41 | else | |
42 | echo " PASSED" | |
43 | fi | |
44 | echo "" | |
45 | ||
46 | echo "Delete Printer Test" | |
47 | echo "" | |
48 | echo " lpadmin -x Test3" | |
a2326b5b | 49 | $VALGRIND ../systemv/lpadmin -x Test3 2>&1 |
ef416fc2 | 50 | if test $? != 0; then |
51 | echo " FAILED" | |
52 | exit 1 | |
53 | else | |
54 | echo " PASSED" | |
55 | fi | |
56 | echo "" | |
57 | ||
a29fd7dd MS |
58 | echo "Add Shared Printer Test" |
59 | echo "" | |
60 | echo " lpadmin -p Test3 -E -v ipp://localhost:8631/printers/Test2 -m raw" | |
61 | $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://localhost:8631/printers/Test2 -m raw 2>&1 | |
62 | if test $? != 0; then | |
63 | echo " FAILED" | |
64 | exit 1 | |
65 | else | |
66 | echo " PASSED" | |
67 | fi | |
68 | echo "" | |
69 | ||
ef416fc2 | 70 | # |
1a18c85c | 71 | # End of "$Id: 5.1-lpadmin.sh 11398 2013-11-06 20:11:11Z msweet $". |
ef416fc2 | 72 | # |