]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
503b54c9 | 3 | # Test the lpstat command. |
ef416fc2 | 4 | # |
35fc2243 | 5 | # Copyright 2007-2017 by Apple Inc. |
503b54c9 | 6 | # Copyright 1997-2005 by Easy Software Products, all rights reserved. |
ef416fc2 | 7 | # |
503b54c9 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 | ||
35fc2243 | 15 | echo "LPSTAT Basic Test" |
ef416fc2 | 16 | echo "" |
17 | echo " lpstat -t" | |
a2326b5b | 18 | $VALGRIND ../systemv/lpstat -t 2>&1 |
ef416fc2 | 19 | if test $? != 0; then |
20 | echo " FAILED" | |
21 | exit 1 | |
22 | else | |
23 | echo " PASSED" | |
24 | fi | |
25 | echo "" | |
26 | ||
35fc2243 MS |
27 | echo "LPSTAT Enumeration Test" |
28 | echo "" | |
29 | echo " lpstat -e" | |
30 | printers="`$VALGRIND ../systemv/lpstat -e 2>&1`" | |
31 | if test $? != 0 -o "x$printers" = x; then | |
32 | echo " FAILED" | |
33 | exit 1 | |
34 | else | |
35 | for printer in $printers; do | |
36 | echo $printer | |
37 | done | |
38 | echo " PASSED" | |
39 | fi | |
40 | echo "" | |
41 | ||
42 | echo "LPSTAT Get Host Test" | |
e07d4801 MS |
43 | echo "" |
44 | echo " lpstat -H" | |
a2326b5b | 45 | server="`$VALGRIND ../systemv/lpstat -H 2>&1`" |
2cf627f0 | 46 | if test $? != 0 -o "x$server" != x$CUPS_SERVER; then |
e07d4801 MS |
47 | echo " FAILED ($server)" |
48 | exit 1 | |
49 | else | |
50 | echo " PASSED ($server)" | |
51 | fi | |
52 | echo "" |