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