]> git.ipfire.org Git - thirdparty/cups.git/blob - test/5.5-lp.sh
Load cups into easysw/current.
[thirdparty/cups.git] / test / 5.5-lp.sh
1 #!/bin/sh
2 #
3 # "$Id: 5.5-lp.sh 6649 2007-07-11 21:46:42Z mike $"
4 #
5 # Test the lp command.
6 #
7 # Copyright 2007 by Apple Inc.
8 # Copyright 1997-2005 by Easy Software Products, all rights reserved.
9 #
10 # These coded instructions, statements, and computer programs are the
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/".
15 #
16
17 echo "LP Default Test"
18 echo ""
19 echo " lp testfile.jpg"
20 ../systemv/lp testfile.jpg 2>&1
21 if test $? != 0; then
22 echo " FAILED"
23 exit 1
24 else
25 echo " PASSED"
26 fi
27 echo ""
28
29 echo "LP Destination Test"
30 echo ""
31 echo " lp -d Test1 testfile.jpg"
32 ../systemv/lp -d Test1 -o job-hold-until=indefinite testfile.jpg 2>&1
33 if test $? != 0; then
34 echo " FAILED"
35 exit 1
36 else
37 echo " PASSED"
38 fi
39 echo ""
40
41 echo "LP Flood Test"
42 echo ""
43 echo " lp -d Test1 testfile.jpg ($1 times in parallel)"
44 i=0
45 while test $i -lt $1; do
46 echo " flood copy $i..." 1>&2
47 ../systemv/lp -d Test1 testfile.jpg 2>&1 &
48 lppid=$!
49 i=`expr $i + 1`
50 done
51 wait $lppid
52 if test $? != 0; then
53 echo " FAILED"
54 exit 1
55 else
56 echo " PASSED"
57 fi
58 echo ""
59
60 #
61 # End of "$Id: 5.5-lp.sh 6649 2007-07-11 21:46:42Z mike $".
62 #