1*5e7646d2SAndroid Build Coastguard Worker#!/bin/sh 2*5e7646d2SAndroid Build Coastguard Worker# 3*5e7646d2SAndroid Build Coastguard Worker# Test the lprm command. 4*5e7646d2SAndroid Build Coastguard Worker# 5*5e7646d2SAndroid Build Coastguard Worker# Copyright © 2007-2019 by Apple Inc. 6*5e7646d2SAndroid Build Coastguard Worker# Copyright © 1997-2005 by Easy Software Products, all rights reserved. 7*5e7646d2SAndroid Build Coastguard Worker# 8*5e7646d2SAndroid Build Coastguard Worker# Licensed under Apache License v2.0. See the file "LICENSE" for more 9*5e7646d2SAndroid Build Coastguard Worker# information. 10*5e7646d2SAndroid Build Coastguard Worker# 11*5e7646d2SAndroid Build Coastguard Worker 12*5e7646d2SAndroid Build Coastguard Workerecho "LPRM Current Test" 13*5e7646d2SAndroid Build Coastguard Workerecho "" 14*5e7646d2SAndroid Build Coastguard Workerecho " lpr -o job-hold-until=indefinite testfile.jpg" 15*5e7646d2SAndroid Build Coastguard Worker$runcups $VALGRIND ../berkeley/lpr -o job-hold-until=indefinite ../examples/testfile.jpg 2>&1 16*5e7646d2SAndroid Build Coastguard Workerecho " lprm" 17*5e7646d2SAndroid Build Coastguard Worker$runcups $VALGRIND ../berkeley/lprm 2>&1 18*5e7646d2SAndroid Build Coastguard Workerif test $? != 0; then 19*5e7646d2SAndroid Build Coastguard Worker echo " FAILED" 20*5e7646d2SAndroid Build Coastguard Worker exit 1 21*5e7646d2SAndroid Build Coastguard Workerelse 22*5e7646d2SAndroid Build Coastguard Worker echo " PASSED" 23*5e7646d2SAndroid Build Coastguard Workerfi 24*5e7646d2SAndroid Build Coastguard Workerecho "" 25*5e7646d2SAndroid Build Coastguard Worker 26*5e7646d2SAndroid Build Coastguard Workerecho "LPRM Destination Test" 27*5e7646d2SAndroid Build Coastguard Workerecho "" 28*5e7646d2SAndroid Build Coastguard Workerecho " lpr -P Test1 -o job-hold-until=indefinite testfile.jpg" 29*5e7646d2SAndroid Build Coastguard Worker$runcups $VALGRIND ../berkeley/lpr -P Test1 -o job-hold-until=indefinite ../examples/testfile.jpg 2>&1 30*5e7646d2SAndroid Build Coastguard Workerecho " lprm Test1" 31*5e7646d2SAndroid Build Coastguard Worker$runcups $VALGRIND ../berkeley/lprm Test1 2>&1 32*5e7646d2SAndroid Build Coastguard Workerif test $? != 0; then 33*5e7646d2SAndroid Build Coastguard Worker echo " FAILED" 34*5e7646d2SAndroid Build Coastguard Worker exit 1 35*5e7646d2SAndroid Build Coastguard Workerelse 36*5e7646d2SAndroid Build Coastguard Worker echo " PASSED" 37*5e7646d2SAndroid Build Coastguard Workerfi 38*5e7646d2SAndroid Build Coastguard Workerecho "" 39