]> git.ipfire.org Git - thirdparty/cups.git/blame - test/5.4-lpstat.sh
Update test suite for new location of test files.
[thirdparty/cups.git] / test / 5.4-lpstat.sh
CommitLineData
ef416fc2 1#!/bin/sh
2#
503b54c9 3# Test the lpstat command.
ef416fc2 4#
feb13eea 5# Copyright © 2007-2019 by Apple Inc.
53f8d64f 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 12echo "LPSTAT Basic Test"
ef416fc2 13echo ""
14echo " lpstat -t"
b37177a7 15$runcups $VALGRIND ../systemv/lpstat -t 2>&1
ef416fc2 16if test $? != 0; then
17 echo " FAILED"
18 exit 1
19else
20 echo " PASSED"
21fi
22echo ""
23
35fc2243
MS
24echo "LPSTAT Enumeration Test"
25echo ""
26echo " lpstat -e"
b37177a7 27printers="`$runcups $VALGRIND ../systemv/lpstat -e 2>&1`"
35fc2243
MS
28if test $? != 0 -o "x$printers" = x; then
29 echo " FAILED"
30 exit 1
31else
32 for printer in $printers; do
33 echo $printer
34 done
35 echo " PASSED"
36fi
37echo ""
38
39echo "LPSTAT Get Host Test"
e07d4801
MS
40echo ""
41echo " lpstat -H"
b37177a7 42server="`$runcups $VALGRIND ../systemv/lpstat -H 2>&1`"
2cf627f0 43if test $? != 0 -o "x$server" != x$CUPS_SERVER; then
e07d4801
MS
44 echo " FAILED ($server)"
45 exit 1
46else
47 echo " PASSED ($server)"
48fi
49echo ""