]> git.ipfire.org Git - thirdparty/cups.git/blob - test/5.1-lpadmin.sh
Simplify the logic in ippCopyAttribute.
[thirdparty/cups.git] / test / 5.1-lpadmin.sh
1 #!/bin/sh
2 #
3 # Test the lpadmin command.
4 #
5 # Copyright 2007-2013 by Apple Inc.
6 # Copyright 1997-2005 by Easy Software Products, all rights reserved.
7 #
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/".
13 #
14
15 echo "Add Printer Test"
16 echo ""
17 echo " lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd"
18 $VALGRIND ../systemv/lpadmin -p Test3 -v file:/dev/null -E -m drv:///sample.drv/deskjet.ppd 2>&1
19 if test $? != 0; then
20 echo " FAILED"
21 exit 1
22 else
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
29 fi
30 echo ""
31
32 echo "Modify Printer Test"
33 echo ""
34 echo " lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4"
35 $VALGRIND ../systemv/lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4 2>&1
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"
47 $VALGRIND ../systemv/lpadmin -x Test3 2>&1
48 if test $? != 0; then
49 echo " FAILED"
50 exit 1
51 else
52 echo " PASSED"
53 fi
54 echo ""
55
56 echo "Add Shared Printer Test"
57 echo ""
58 echo " lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m everywhere"
59 $VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://localhost:$IPP_PORT/printers/Test2 -m everywhere 2>&1
60 if test $? != 0; then
61 echo " FAILED"
62 exit 1
63 else
64 echo " PASSED"
65 fi
66 echo ""