]> git.ipfire.org Git - thirdparty/cups.git/blob - test/5.1-lpadmin.sh
5568f4ca03a55dc43ce0c00c6698b10d75d77b1b
[thirdparty/cups.git] / test / 5.1-lpadmin.sh
1 #!/bin/sh
2 #
3 # "$Id$"
4 #
5 # Test the lpadmin command.
6 #
7 # Copyright 2007-2013 by Apple Inc.
8 # Copyright 1997-2005 by Easy Software Products, all rights reserved.
9 #
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/".
15 #
16
17 echo "Add Printer Test"
18 echo ""
19 echo " lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd"
20 $VALGRIND ../systemv/lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd 2>&1
21 if test $? != 0; then
22 echo " FAILED"
23 exit 1
24 else
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
31 fi
32 echo ""
33
34 echo "Modify Printer Test"
35 echo ""
36 echo " lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4"
37 $VALGRIND ../systemv/lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4 2>&1
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"
49 $VALGRIND ../systemv/lpadmin -x Test3 2>&1
50 if test $? != 0; then
51 echo " FAILED"
52 exit 1
53 else
54 echo " PASSED"
55 fi
56 echo ""
57
58 echo "Add Shared Printer Test"
59 echo ""
60 echo " lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m raw"
61 $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/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
70 #
71 # End of "$Id$".
72 #