From 4bdbabf76b1cd03e38ae57be482ae1f740b7f50c Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 6 Nov 2013 20:06:50 +0000 Subject: Fix "make check" on Linux () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11395 a1ca3aef-8c08-0410-bb20-df032aa958be --- systemv/lpstat.c | 31 +++------ test/onepage-a4-300-black-1.pwg.gz | Bin 0 -> 152826 bytes test/onepage-letter-300-black-1.pwg.gz | Bin 0 -> 137724 bytes test/run-stp-tests.sh | 119 ++++++++++++++++++++++++--------- test/test.convs | 9 +++ test/testhp.ppd | 29 ++++---- 6 files changed, 122 insertions(+), 66 deletions(-) create mode 100644 test/onepage-a4-300-black-1.pwg.gz create mode 100644 test/onepage-letter-300-black-1.pwg.gz create mode 100644 test/test.convs diff --git a/systemv/lpstat.c b/systemv/lpstat.c index 8ead3f143..3bdca13a7 100644 --- a/systemv/lpstat.c +++ b/systemv/lpstat.c @@ -1,30 +1,16 @@ /* * "$Id$" * - * "lpstat" command for CUPS. + * "lpstat" command for CUPS. * - * Copyright 2007-2013 by Apple Inc. - * Copyright 1997-2006 by Easy Software Products. + * Copyright 2007-2013 by Apple Inc. + * Copyright 1997-2006 by Easy Software Products. * - * These coded instructions, statements, and computer programs are the - * property of Apple Inc. and are protected by Federal copyright - * law. Distribution and use rights are outlined in the file "LICENSE.txt" - * which should have been included with this file. If this file is - * file is missing or damaged, see the license at "http://www.cups.org/". - * - * Contents: - * - * main() - Parse options and show status information. - * check_dest() - Verify that the named destination(s) exists. - * match_list() - Match a name from a list of comma or space-separated - * names. - * show_accepting() - Show acceptance status. - * show_classes() - Show printer classes. - * show_default() - Show default destination. - * show_devices() - Show printer devices. - * show_jobs() - Show active print jobs. - * show_printers() - Show printers. - * show_scheduler() - Show scheduler status. + * These coded instructions, statements, and computer programs are the + * property of Apple Inc. and are protected by Federal copyright + * law. Distribution and use rights are outlined in the file "LICENSE.txt" + * which should have been included with this file. If this file is + * file is missing or damaged, see the license at "http://www.cups.org/". */ /* @@ -109,6 +95,7 @@ main(int argc, /* I - Number of command-line arguments */ _cupsLangPuts(stdout, cupsServer()); else _cupsLangPrintf(stdout, "%s:%d", cupsServer(), ippPort()); + op = 'H'; break; case 'P' : /* Show paper types */ diff --git a/test/onepage-a4-300-black-1.pwg.gz b/test/onepage-a4-300-black-1.pwg.gz new file mode 100644 index 000000000..0a559fc16 Binary files /dev/null and b/test/onepage-a4-300-black-1.pwg.gz differ diff --git a/test/onepage-letter-300-black-1.pwg.gz b/test/onepage-letter-300-black-1.pwg.gz new file mode 100644 index 000000000..8fd7386e3 Binary files /dev/null and b/test/onepage-letter-300-black-1.pwg.gz differ diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index 656503a5a..6ea17f45d 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -346,38 +346,97 @@ ln -s $root/templates /tmp/cups-$user/share # Local filters and configuration files... # +instfilter() { + # instfilter src dst format + # + # See if the filter exists in a standard location; if so, make a + # symlink, otherwise create a dummy script for the specified format. + # + src="$1" + dst="$2" + format="$3" + + for dir in /usr/libexec/cups/filter /usr/lib/cups/filter; do + if test -x "$dir/$src"; then + ln -s "$dir/$src" "/tmp/cups-$user/bin/filter/$dst" + return + fi + done + + # Source filter not present, create a dummy filter + case $format in + passthru) + ln -s gziptoany "/tmp/cups-$user/bin/filter/$dst" + ;; + pdf) + cat >"/tmp/cups-$user/bin/filter/$dst" <"/tmp/cups-$user/bin/filter/$dst" <"/tmp/cups-$user/bin/filter/$dst" <>setpagedevice" -*Resolution 100dpi/100 DPI: "<>setpagedevice" +*DefaultResolution: 300dpi +*Resolution 150dpi/150 DPI: "<>setpagedevice" +*Resolution 300dpi/300 DPI: "<>setpagedevice" +*Resolution 600dpi/600 DPI: "<>setpagedevice" *CloseUI: *Resolution *OpenUI *ColorModel/Output Mode: PickOne -- cgit v1.2.1