]> git.ipfire.org Git - thirdparty/cups.git/blob - test/5.4-lpstat.sh
Update test suite for new location of test files.
[thirdparty/cups.git] / test / 5.4-lpstat.sh
1 #!/bin/sh
2 #
3 # Test the lpstat command.
4 #
5 # Copyright © 2007-2019 by Apple Inc.
6 # Copyright © 1997-2005 by Easy Software Products, all rights reserved.
7 #
8 # Licensed under Apache License v2.0. See the file "LICENSE" for more
9 # information.
10 #
11
12 echo "LPSTAT Basic Test"
13 echo ""
14 echo " lpstat -t"
15 $runcups $VALGRIND ../systemv/lpstat -t 2>&1
16 if test $? != 0; then
17 echo " FAILED"
18 exit 1
19 else
20 echo " PASSED"
21 fi
22 echo ""
23
24 echo "LPSTAT Enumeration Test"
25 echo ""
26 echo " lpstat -e"
27 printers="`$runcups $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"
40 echo ""
41 echo " lpstat -H"
42 server="`$runcups $VALGRIND ../systemv/lpstat -H 2>&1`"
43 if test $? != 0 -o "x$server" != x$CUPS_SERVER; then
44 echo " FAILED ($server)"
45 exit 1
46 else
47 echo " PASSED ($server)"
48 fi
49 echo ""