From: Michael R Sweet Date: Mon, 24 Nov 2025 16:45:35 +0000 (-0500) Subject: Fix generated test filter scripts. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bac84c666aa755b57f147b95cb32ffd25379d95;p=thirdparty%2Fcups.git Fix generated test filter scripts. --- diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index 0c5c3becf4..e4330bf9f4 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -363,68 +363,67 @@ ln -s $root/templates $BASE/share # instfilter() { - # instfilter src dst format + # instfilter NAME FORMAT # # Create a dummy script for the specified format. # - src="$1" - dst="$2" - format="$3" + name="$1" + format="$2" case $format in passthru) - ln -s gziptoany "$BASE/bin/filter/$dst" + ln -s gziptoany "$BASE/bin/filter/$name" ;; pdf) - cat >"$BASE/bin/filter/$dst" <"$BASE/bin/filter/$name" </dev/null +gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" \$6 >/dev/null case "\$5" in *media=a4* | *media=iso_a4* | *PageSize=A4*) - gziptoany "$1" "$2" "$3" "$4" "$5" "$root/examples/onepage-a4.pdf" + gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" "$root/examples/onepage-a4.pdf" ;; *) - gziptoany "$1" "$2" "$3" "$4" "$5" "$root/examples/onepage-letter.pdf" + gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" "$root/examples/onepage-letter.pdf" ;; esac EOF - chmod +x "$BASE/bin/filter/$dst" + chmod +x "$BASE/bin/filter/$name" ;; ps) - cat >"$BASE/bin/filter/$dst" <"$BASE/bin/filter/$name" </dev/null +gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" \$6 >/dev/null case "\$5" in *media=a4* | *media=iso_a4* | *PageSize=A4*) - gziptoany "$1" "$2" "$3" "$4" "$5" "$root/examples/onepage-a4.ps" + gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" "$root/examples/onepage-a4.ps" ;; *) - gziptoany "$1" "$2" "$3" "$4" "$5" "$root/examples/onepage-letter.ps" + gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" "$root/examples/onepage-letter.ps" ;; esac EOF - chmod +x "$BASE/bin/filter/$dst" + chmod +x "$BASE/bin/filter/$name" ;; raster) - cat >"$BASE/bin/filter/$dst" <"$BASE/bin/filter/$name" </dev/null +gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" \$6 >/dev/null case "\$5" in *media=a4* | *media=iso_a4* | *PageSize=A4*) - gziptoany "$1" "$2" "$3" "$4" "$5" "$root/examples/onepage-a4-300-black-1.pwg" + gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" "$root/examples/onepage-a4-300-black-1.pwg" ;; *) - gziptoany "$1" "$2" "$3" "$4" "$5" "$root/examples/onepage-letter-300-black-1.pwg" + gziptoany "\$1" "\$2" "\$3" "\$4" "\$5" "$root/examples/onepage-letter-300-black-1.pwg" ;; esac EOF - chmod +x "$BASE/bin/filter/$dst" + chmod +x "$BASE/bin/filter/$name" ;; esac } @@ -432,25 +431,26 @@ EOF ln -s $root/test/test.convs $BASE/share/mime if test `uname` = Darwin; then - instfilter cgimagetopdf imagetopdf pdf - instfilter cgpdftopdf pdftopdf passthru - instfilter cgpdftops pdftops ps - instfilter cgpdftoraster pdftoraster raster - instfilter cgtexttopdf texttopdf pdf - instfilter pstocupsraster pstoraster raster + instfilter imagetopdf pdf + instfilter pdftopdf passthru + instfilter pdftops ps + instfilter pdftoraster raster + instfilter texttopdf pdf + instfilter pstoraster raster else - instfilter imagetopdf imagetopdf pdf - instfilter pdftopdf pdftopdf passthru - instfilter pdftops pdftops ps - instfilter pdftoraster pdftoraster raster - instfilter pstoraster pstoraster raster - instfilter texttopdf texttopdf pdf + instfilter imagetopdf pdf + instfilter pdftopdf passthru + instfilter pdftops ps + instfilter pdftoraster raster + instfilter pstoraster raster + instfilter texttopdf pdf if test -d /usr/share/cups/charsets; then ln -s /usr/share/cups/charsets $BASE/share fi fi + # # Then create the necessary config files... #