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