]> git.ipfire.org Git - thirdparty/cups.git/blame - test/5.1-lpadmin.sh
Changelog.
[thirdparty/cups.git] / test / 5.1-lpadmin.sh
CommitLineData
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
15echo "Add Printer Test"
16echo ""
d1c13e16 17echo " 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 19if test $? != 0; then
20 echo " FAILED"
21 exit 1
22else
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 29fi
30echo ""
31
32echo "Modify Printer Test"
33echo ""
34echo " 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 36if test $? != 0; then
37 echo " FAILED"
38 exit 1
39else
40 echo " PASSED"
41fi
42echo ""
43
44echo "Delete Printer Test"
45echo ""
46echo " lpadmin -x Test3"
a2326b5b 47$VALGRIND ../systemv/lpadmin -x Test3 2>&1
ef416fc2 48if test $? != 0; then
49 echo " FAILED"
50 exit 1
51else
52 echo " PASSED"
53fi
54echo ""
55
a29fd7dd
MS
56echo "Add Shared Printer Test"
57echo ""
8f8d5cd4
MS
58echo " 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
60if test $? != 0; then
61 echo " FAILED"
62 exit 1
63else
64 echo " PASSED"
65fi
66echo ""