]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
e12bb97d | 3 | # Test the lpadmin command. |
ef416fc2 | 4 | # |
e12bb97d MS |
5 | # Copyright 2007-2013 by Apple Inc. |
6 | # Copyright 1997-2005 by Easy Software Products, all rights reserved. | |
ef416fc2 | 7 | # |
e12bb97d MS |
8 | # These coded instructions, statements, and computer programs are the |
9 | # property of Apple Inc. and are protected by Federal copyright | |
10 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
11 | # which should have been included with this file. If this file is | |
12 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 13 | # |
14 | ||
15 | echo "Add Printer Test" | |
16 | echo "" | |
d1c13e16 | 17 | echo " lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd" |
a2326b5b | 18 | $VALGRIND ../systemv/lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd 2>&1 |
ef416fc2 | 19 | if test $? != 0; then |
20 | echo " FAILED" | |
21 | exit 1 | |
22 | else | |
e12bb97d MS |
23 | if test -f $CUPS_SERVERROOT/ppd/Test3.ppd; then |
24 | echo " PASSED" | |
25 | else | |
26 | echo " FAILED (No PPD)" | |
27 | exit 1 | |
28 | fi | |
ef416fc2 | 29 | fi |
30 | echo "" | |
31 | ||
32 | echo "Modify Printer Test" | |
33 | echo "" | |
34 | echo " lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4" | |
a2326b5b | 35 | $VALGRIND ../systemv/lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4 2>&1 |
ef416fc2 | 36 | if test $? != 0; then |
37 | echo " FAILED" | |
38 | exit 1 | |
39 | else | |
40 | echo " PASSED" | |
41 | fi | |
42 | echo "" | |
43 | ||
44 | echo "Delete Printer Test" | |
45 | echo "" | |
46 | echo " lpadmin -x Test3" | |
a2326b5b | 47 | $VALGRIND ../systemv/lpadmin -x Test3 2>&1 |
ef416fc2 | 48 | if test $? != 0; then |
49 | echo " FAILED" | |
50 | exit 1 | |
51 | else | |
52 | echo " PASSED" | |
53 | fi | |
54 | echo "" | |
55 | ||
a29fd7dd MS |
56 | echo "Add Shared Printer Test" |
57 | echo "" | |
8f8d5cd4 MS |
58 | echo " lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m raw" |
59 | $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m raw 2>&1 | |
a29fd7dd MS |
60 | if test $? != 0; then |
61 | echo " FAILED" | |
62 | exit 1 | |
63 | else | |
64 | echo " PASSED" | |
65 | fi | |
66 | echo "" |