]> git.ipfire.org Git - thirdparty/cups.git/blame - test/5.6-lpr.sh
Load cups into easysw/current.
[thirdparty/cups.git] / test / 5.6-lpr.sh
CommitLineData
ef416fc2 1#!/bin/sh
2#
bc44d920 3# "$Id: 5.6-lpr.sh 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 4#
5# Test the lpr command.
6#
bc44d920 7# Copyright 2007 by Apple Inc.
ef416fc2 8# Copyright 1997-2005 by Easy Software Products, all rights reserved.
9#
10# These coded instructions, statements, and computer programs are the
bc44d920 11# property of Apple Inc. and are protected by Federal copyright
12# law. Distribution and use rights are outlined in the file "LICENSE.txt"
13# which should have been included with this file. If this file is
14# file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 15#
16
17echo "LPR Default Test"
18echo ""
19echo " lpr testfile.jpg"
20../berkeley/lpr testfile.jpg 2>&1
21if test $? != 0; then
22 echo " FAILED"
23 exit 1
24else
25 echo " PASSED"
26fi
27echo ""
28
29echo "LPR Destination Test"
30echo ""
31echo " lpr -P Test1 testfile.jpg"
32../berkeley/lpr -P Test1 testfile.jpg 2>&1
33if test $? != 0; then
34 echo " FAILED"
35 exit 1
36else
37 echo " PASSED"
38fi
39echo ""
40
41echo "LPR Flood Test"
42echo ""
43echo " lpr -P Test1 testfile.jpg ($1 times in parallel)"
44i=0
45while test $i -lt $1; do
46 echo " flood copy $i..." 1>&2
47 ../berkeley/lpr -P Test1 testfile.jpg 2>&1 &
48 lprpid=$!
49 i=`expr $i + 1`
50done
51wait $lppid
52if test $? != 0; then
53 echo " FAILED"
54 exit 1
55else
56 echo " PASSED"
57fi
58echo ""
59
60#
bc44d920 61# End of "$Id: 5.6-lpr.sh 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 62#