]> git.ipfire.org Git - thirdparty/cups.git/blame - test/5.1-lpadmin.sh
Import CUPS v2.0b1
[thirdparty/cups.git] / test / 5.1-lpadmin.sh
CommitLineData
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
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
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 31fi
32echo ""
33
34echo "Modify Printer Test"
35echo ""
36echo " 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 38if test $? != 0; then
39 echo " FAILED"
40 exit 1
41else
42 echo " PASSED"
43fi
44echo ""
45
46echo "Delete Printer Test"
47echo ""
48echo " lpadmin -x Test3"
a2326b5b 49$VALGRIND ../systemv/lpadmin -x Test3 2>&1
ef416fc2 50if test $? != 0; then
51 echo " FAILED"
52 exit 1
53else
54 echo " PASSED"
55fi
56echo ""
57
a29fd7dd
MS
58echo "Add Shared Printer Test"
59echo ""
60echo " 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
62if test $? != 0; then
63 echo " FAILED"
64 exit 1
65else
66 echo " PASSED"
67fi
68echo ""
69
ef416fc2 70#
1a18c85c 71# End of "$Id: 5.1-lpadmin.sh 11398 2013-11-06 20:11:11Z msweet $".
ef416fc2 72#