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