]> git.ipfire.org Git - thirdparty/cups.git/blame - test/5.1-lpadmin.sh
Import CUPS v1.7.1
[thirdparty/cups.git] / test / 5.1-lpadmin.sh
CommitLineData
ef416fc2 1#!/bin/sh
2#
61515785 3# "$Id: 5.1-lpadmin.sh 11396 2013-11-06 20:09:03Z msweet $"
ef416fc2 4#
5# Test the lpadmin command.
6#
a29fd7dd 7# Copyright 2007-2012 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
17echo "Add Printer Test"
18echo ""
d1c13e16 19echo " 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 21if test $? != 0; then
22 echo " FAILED"
23 exit 1
24else
25 echo " PASSED"
26fi
27echo ""
28
29echo "Modify Printer Test"
30echo ""
31echo " lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4"
a2326b5b 32$VALGRIND ../systemv/lpadmin -p Test3 -v file:/tmp/Test3 -o PageSize=A4 2>&1
ef416fc2 33if test $? != 0; then
34 echo " FAILED"
35 exit 1
36else
37 echo " PASSED"
38fi
39echo ""
40
41echo "Delete Printer Test"
42echo ""
43echo " lpadmin -x Test3"
a2326b5b 44$VALGRIND ../systemv/lpadmin -x Test3 2>&1
ef416fc2 45if test $? != 0; then
46 echo " FAILED"
47 exit 1
48else
49 echo " PASSED"
50fi
51echo ""
52
a29fd7dd
MS
53echo "Add Shared Printer Test"
54echo ""
55echo " lpadmin -p Test3 -E -v ipp://localhost:8631/printers/Test2 -m raw"
56$VALGRIND ../systemv/lpadmin -p Test3 -E -v ipp://localhost:8631/printers/Test2 -m raw 2>&1
57if test $? != 0; then
58 echo " FAILED"
59 exit 1
60else
61 echo " PASSED"
62fi
63echo ""
64
ef416fc2 65#
61515785 66# End of "$Id: 5.1-lpadmin.sh 11396 2013-11-06 20:09:03Z msweet $".
ef416fc2 67#