]> git.ipfire.org Git - thirdparty/cups.git/blame - test/5.6-lpr.sh
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / test / 5.6-lpr.sh
CommitLineData
ef416fc2 1#!/bin/sh
2#
503b54c9 3# Test the lpr command.
ef416fc2 4#
503b54c9
MS
5# Copyright 2007-2014 by Apple Inc.
6# Copyright 1997-2005 by Easy Software Products, all rights reserved.
ef416fc2 7#
503b54c9
MS
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/".
ef416fc2 13#
14
15echo "LPR Default Test"
16echo ""
839a51c8 17echo " lpr testfile.pdf"
a2326b5b 18$VALGRIND ../berkeley/lpr testfile.pdf 2>&1
ef416fc2 19if test $? != 0; then
20 echo " FAILED"
21 exit 1
22else
23 echo " PASSED"
24fi
25echo ""
26
27echo "LPR Destination Test"
28echo ""
a29fd7dd
MS
29echo " lpr -P Test3 -o fit-to-page testfile.jpg"
30$VALGRIND ../berkeley/lpr -P Test3 -o fit-to-page testfile.jpg 2>&1
839a51c8
MS
31if test $? != 0; then
32 echo " FAILED"
33 exit 1
34else
35 echo " PASSED"
36fi
37echo ""
38
39echo "LPR Options Test"
40echo ""
41echo " lpr -P Test1 -o number-up=4 -o job-sheets=standard,none testfile.pdf"
a2326b5b 42$VALGRIND ../berkeley/lpr -P Test1 -o number-up=4 -o job-sheets=standard,none testfile.pdf 2>&1
ef416fc2 43if test $? != 0; then
44 echo " FAILED"
45 exit 1
46else
47 echo " PASSED"
48fi
49echo ""
50
839a51c8 51echo "LPR Flood Test ($1 times in parallel)"
ef416fc2 52echo ""
839a51c8
MS
53echo " lpr -P Test1 testfile.jpg"
54echo " lpr -P Test2 testfile.jpg"
ef416fc2 55i=0
2a8db0cd 56pids=""
ef416fc2 57while test $i -lt $1; do
b9faaae1
MS
58 j=1
59 while test $j -le $2; do
a2326b5b 60 $VALGRIND ../berkeley/lpr -P test-$j testfile.jpg 2>&1
b9faaae1
MS
61 j=`expr $j + 1`
62 done
63
a2326b5b 64 $VALGRIND ../berkeley/lpr -P Test1 testfile.jpg 2>&1 &
2a8db0cd 65 pids="$pids $!"
a2326b5b 66 $VALGRIND ../berkeley/lpr -P Test2 testfile.jpg 2>&1 &
2a8db0cd 67 pids="$pids $!"
b9faaae1 68
ef416fc2 69 i=`expr $i + 1`
70done
2a8db0cd 71wait $pids
ef416fc2 72if test $? != 0; then
73 echo " FAILED"
74 exit 1
75else
76 echo " PASSED"
77fi
78echo ""
79
839a51c8 80./waitjobs.sh