From b8baab1ef58b3bbb25caafa9f0d808f503528832 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 1 Apr 2015 02:04:11 +0000 Subject: restructure tests: check-tree, check-package, check-install; add Valgrind facility; doesn't overwrite prior test results git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2443 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/411toppm.test | 4 +- test/BLOCK | 4 + test/Execute-Tests | 239 ++++++++++++++++++++++++++++++------------ test/Makefile | 8 +- test/Test-Order | 3 + test/all-in-place.ok | 38 +------ test/all-in-place.test | 92 +++++----------- test/atari-roundtrip.test | 14 +-- test/atk-roundtrip.test | 5 +- test/avs-roundtrip.test | 4 - test/bmp-roundtrip.test | 5 +- test/cis-roundtrip.test | 8 +- test/cmuw-roundtrip.test | 5 +- test/cut-paste-roundtrip.test | 5 +- test/eyuvtoppm.test | 4 +- test/facesaver-roundtrip.test | 5 +- test/fits-roundtrip.test | 5 +- test/g3-roundtrip.test | 4 - test/gem-roundtrip.test | 9 +- test/gif-quant-roundtrip.test | 7 +- test/gif-roundtrip.test | 11 +- test/hdiff-roundtrip.test | 5 +- test/ilbm-roundtrip.ok | 1 + test/ilbm-roundtrip.test | 9 -- test/jbig-roundtrip.test | 5 +- test/leaf-roundtrip.test | 5 +- test/legacy-names.ok | 36 +++++++ test/legacy-names.test | 131 +++++++++++++++++++++++ test/macp-roundtrip.test | 7 +- test/mda-roundtrip.test | 8 +- test/mgr-roundtrip.test | 5 +- test/mrf-roundtrip.test | 5 +- test/pad-crop-roundtrip.test | 3 - test/pambackground.test | 14 +-- test/pamchannel.test | 3 - test/pamcrater.test | 10 +- test/pamcut.test | 10 +- test/pamdepth-roundtrip.test | 5 +- test/pamdice-roundtrip.test | 6 +- test/pamditherbw.test | 4 +- test/pamedge.test | 7 -- test/pamenlarge.test | 5 - test/pamfile.test | 7 +- test/pamflip-roundtrip.test | 4 +- test/pamflip1.test | 6 +- test/pamflip2.test | 4 +- test/pamseq.test | 4 +- test/pamslice-roundtrip.test | 35 +++---- test/pamsumm.test | 4 +- test/pamtopam.test | 4 +- test/pbmclean.test | 5 - test/pbmmake.test | 5 +- test/pbmminkowski.test | 4 - test/pbmpage.test | 6 +- test/pbmpscale.test | 6 +- test/pbmtext.test | 4 +- test/pbmtog3.test | 3 - test/pbmupc.test | 4 +- test/pcx-roundtrip.test | 6 +- test/pfm-roundtrip.test | 4 - test/pgmbentley.test | 3 - test/pgmcrater.ok | 1 - test/pgmcrater.test | 31 ------ test/pgmhist.test | 3 - test/pgmmake.test | 10 +- test/pgmnoise.test | 4 +- test/pgmramp.test | 7 +- test/pgmtopgm.test | 4 +- test/pgmtoppm.test | 7 -- test/pi3-roundtrip.test | 10 +- test/pict-roundtrip.test | 7 -- test/png-roundtrip.test | 11 +- test/pnm-pam-roundtrip.test | 6 +- test/pnm-plain-roundtrip.test | 15 ++- test/pnmcat.test | 4 +- test/pnminvert-roundtrip.test | 4 +- test/pnminvert.test | 7 +- test/pnmpsnr.test | 3 - test/pnmremap1.test | 11 +- test/pnmremap2.test | 7 +- test/pnmshear.test | 4 - test/pnmtile.test | 3 - test/pnmtopnm-plain.test | 15 +-- test/ppmbrighten.test | 4 +- test/ppmchange-roundtrip.test | 5 - test/ppmchange.test | 12 +-- test/ppmcie.test | 8 +- test/ppmdfont.test | 6 +- test/ppmdim.test | 9 +- test/ppmdither.test | 4 +- test/ppmforge.test | 4 +- test/ppmgauss.test | 4 +- test/ppmhist.test | 4 - test/ppmmake.test | 9 +- test/ppmmix.test | 13 +-- test/ppmpat.test | 4 +- test/ppmrelief.test | 6 -- test/ppmrough.test | 5 +- test/ppmtopgm.test | 5 +- test/ppmtoppm.test | 4 +- test/ppmwheel.test | 8 +- test/ps-alt-roundtrip.test | 17 +-- test/ps-roundtrip.test | 24 ++--- test/rgb3-roundtrip.test | 6 -- test/sbig-roundtrip.test | 5 +- test/sgi-roundtrip.test | 4 - test/st4-roundtrip.test | 3 - test/sunrast-roundtrip.test | 7 +- test/symmetry.test | 8 -- test/targa-roundtrip.test | 6 +- test/testrandom.c | 3 + test/tiff-roundtrip.test | 9 +- test/utahrle-roundtrip.test | 5 +- test/wbmp-roundtrip.test | 5 +- test/winicon-roundtrip.test | 13 +-- test/xbm-roundtrip.test | 5 +- test/xpm-roundtrip.test | 5 - test/xwd-roundtrip.test | 6 +- test/yuv-roundtrip.test | 4 - 119 files changed, 531 insertions(+), 773 deletions(-) create mode 100644 test/BLOCK create mode 100644 test/legacy-names.ok create mode 100755 test/legacy-names.test delete mode 100644 test/pgmcrater.ok delete mode 100755 test/pgmcrater.test diff --git a/test/411toppm.test b/test/411toppm.test index 335cdcc8..98170c67 100755 --- a/test/411toppm.test +++ b/test/411toppm.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: 411toppm -# Also requires: +# Also requires: - alias 411toppm="${PBM_TESTPREFIX}411toppm" - shopt -s expand_aliases # Test 1. should produce: 240376509 9229 # The above value is what 411toppm has been always producing. diff --git a/test/BLOCK b/test/BLOCK new file mode 100644 index 00000000..f928dc09 --- /dev/null +++ b/test/BLOCK @@ -0,0 +1,4 @@ +#! /bin/sh + +echo `basename $0` : command not found in test path 1>&2 +exit 88 diff --git a/test/Execute-Tests b/test/Execute-Tests index 68dd5581..12418bed 100755 --- a/test/Execute-Tests +++ b/test/Execute-Tests @@ -1,43 +1,49 @@ #! /bin/bash -# Confirm that PBM_TESTPREFIX is set. -# PBM_TESTPREFIX is the directory with the Netpbm programs you want to -# test. If set to null, executables will be sought from the default -# execution path ($PATH). Usually you should explicitly set this. +# See if PBM_TEST_PATH is set. +# PBM_TEST_PATH is the list of directories with the Netpbm programs +# you want to test. +# +# (1) check-tree: set to a long list of directories which contain +# the relevant executables. +# +# (2) check-package: set to the [package]/bin directory. +# +# (3) check-install: empty string. Executables will be sought from +# the default execution path ($PATH). # # You can set it here by de-commenting and modifying the next line: -#export PBM_TESTPREFIX="/usr/local/bin/" +#export PBM_TEST_PATH="/usr/local/bin/" -if [ -z $PBM_TESTPREFIX ] +case ${CHECK_TYPE} in +tree) + echo + echo "Checking programs in source tree" ;; +package) if [ -z $PBM_TEST_PATH ] then - echo "Warning: PBM_TESTPREFIX is not set." + echo "Error: PBM_TEST_PATH is not set." + exit 1 + elif [ ! -d $PBM_TEST_PATH ] + then + echo + echo "Error: No directory named $PBM_TEST_PATH." + echo + echo "You must run \"make package\" before this test." + echo + echo "If you specified the package directory for \"make package\"" + echo "you must do the same for \"make check\"." + echo + exit 1 + fi ;; +install) + echo echo "Programs in the default execution path:" echo $PATH - echo "will be tested." -elif [ ! -d $PBM_TESTPREFIX ] - then - echo "Error: No directory named $PBM_TESTPREFIX" - exit 1 -else - # append "/" to end of string if necessary - export PBM_TESTPREFIX=$(echo $PBM_TESTPREFIX | sed '/\/$/!s@$@/@') -fi - -# Set PBM_BINPREFIX. -# PBM_BINPREFIX is the directory where Netpbm programs which play -# auxiliary roles in tests (such as image generators for producing -# test images, analyzers to summarize output and so forth). -# -# If testing a fresh install, this should be the same as PBM_TESTPREFIX. -# If you are developing a single Netpbm program, you may want to -# set this to a directory with stable executables. (Final "/" is -# mandatory.) -# If set to null, executables in the default execution path will -# be used. - -# export PBM_BINPREFIX="/usr/local/bin/" -# export PBM_BINPREFIX="" -export PBM_BINPREFIX=${PBM_TESTPREFIX} + echo "will be tested." ;; +*) + echo "Invalid test type: ${CHECK_TYPE}" + exit 1 ;; +esac # Set srcdir, which is the directory which contains Execute-Tests (this # script), programs that run the test, including *.test and helpers that they @@ -46,9 +52,6 @@ export PBM_BINPREFIX=${PBM_TESTPREFIX} srcdir=$(dirname $0) -# Provision to run programs under valgrind. -# export PBM_TESTPREFIX="valgrind --log-fd=4 "${PBM_TESTPREFIX} - # Set tmpdir, which is used in some of the test scripts. By default # this is created by mktemp. The user can override and specify tmpdir, # but in this case it must be an existing directory and must not be @@ -72,19 +75,29 @@ if [ -z $tmpdir ] fi fi - # If necessary set the RGBDEF environment variable. #export RGBDEF=/etc/rgb.txt #export RGBDEF=/usr/local/netpbm/lib/rgb.txt #export RGBDEF=/usr/share/emacs/*/etc/rgb.txt + # Declare arrays used to count and report test results. -# For now only "SUCCESS" and "FAILURE" are used. -declare -a array=(0 0 0 0 0 0) -declare -a status=("SUCCESS" "FAILURE" "UNEXPECTED SUCCESS" - "EXPECTED FAILURE" "NOT TESTABLE" "TOTAL TESTABLE") +# "UNEXPECTED SUCCESS" and "EXPECTED FAILURE" are not used now; +# they are reserved for future expansion. +declare -a array=(0 0 0 0 0) + +# Older versions of bash get confused when array elements contain +# spaces. + +status[0]="SUCCESS" +status[1]="FAILURE" +status[2]="UNEXPECTED SUCCESS" +status[3]="EXPECTED FAILURE" +status[4]="NOT TESTABLE" + + -# Copy test files to the current work directory +# Copy test image files to the current work directory if [ ! -f ./testgrid.pbm ] then cp -v ${srcdir}/testgrid.pbm ./testgrid.pbm @@ -94,15 +107,45 @@ if [ ! -f ./testimg.ppm ] then cp -v ${srcdir}/testimg.ppm ./testimg.ppm fi -# Add PBM_BINPREFIX to PATH. -# This is necessary for Netpbm programs that call other Netpbm programs. +# The block-bin directory +# +# This directory contains dummy executables with the names of the +# Netpbm programs that are to be tested. These dummy executables +# exist to prevent execution of programs (typically from a previous +# installation of Netpbm) in the default path during the tests. +# They report error when accessed and nothing else. +# The directory is placed in PATH between PBM_TEST_PATH and +# default PATH. + +# Create block-bin. If it already exists, erase and create anew. -if [ ! -z $PBM_BINPREFIX ] +if [ ! -z $PBM_TEST_PATH ] then - export PATH=${PBM_BINPREFIX}:$PATH + blockbin=$PWD/block-bin + if [ -d $blockbin ] + then rm -rf $blockbin + fi + mkdir $blockbin + cp ${srcdir}/BLOCK $blockbin/BLOCK + chmod +x $blockbin/BLOCK + +# Populate the block-bin directory using all-in-place.ok and +# legacy-names.ok which together make a complete list of programs. + + sed 's/: ok$//' \ + ${srcdir}/all-in-place.ok ${srcdir}/legacy-names.ok | \ + tr ' ' '\n' | while read prog + do + ln -s $blockbin/BLOCK $blockbin/$prog + done + + testpath=$PBM_TEST_PATH:$blockbin:$PATH:$BUILDDIR/test +else +# We don't need block-bin when testing after installation. + testpath=$PATH:$BUILDDIR/test fi -export PATH=${srcdir}:$PATH + # Execute the tests, as described in the "Test-Order" file. # @@ -118,7 +161,42 @@ export PATH=${srcdir}:$PATH # By default the tests are executed in the order described in the # file Test-Order. Copy this file from the source directory # to the work directory. + + +# Provision for running programs under valgrind. +# Note that valgrind tests consume time. # +# Output from valgrind must be redirected in some manner because some +# tests examine standard error (fd2) output. Here we use --log-file. +# (See below) + +if [ -z $VALGRIND_TESTS ] + then VALGRIND_TESTS="off"; +elif [ $VALGRIND_TESTS = "on" ] + then + valdir=$PWD/valgrind; + mkdir $valdir + + vg_command_base="valgrind --trace-children=yes"; + + for i in awk cat cksum cmp cp cut date dirname egrep fgrep file grep gs \ + head mkdir mktemp perl rm sed seq sh tee testrandom tr uniq + + # Tell valgrind not to probe execution of the above programs. + + do vg_skip=$vg_skip"/*/"$i","; done; + + vg_command_base=$vg_command_base" --trace-children-skip="$vg_skip; + # + # If using an older version of valgrind (< v.3.6) that does not + # support --trace-children-skip=... , comment out the above line + # and let valgrind probe execution of all programs listed above. + # This greatly increases execution time. + +fi + + +# Provision for running only chosen tests. # The string "target" is a comma-separated list of target programs. # When set only tests for programs in the list will be run. # @@ -126,43 +204,65 @@ export PATH=${srcdir}:$PATH # (pared-down) version of Test-Order. if [ ! -z $target ] - then echo $target | sed 's/,/\n/g' | \ - sed 's/^/\${PBM_TESTPREFIX}/' | \ - grep -f - ${srcdir}/*.test -l | \ - while read i ; do echo ${i##*/} ; done | - grep -f - ${srcdir}/Test-Order > ./Test-Order ; - else + then + echo $target | sed 's/,/\n/g' | \ + sed -e 's/^/# This script tests: .*\\/' \ + -e '/^$/q' | \ + grep -f - ${srcdir}/*.test -l | \ + while read i ; do echo ${i##*/} ; done | \ + grep -f - ${srcdir}/Test-Order > ./Test-Order ; + if [ ! -s ./Test-Order ] + then echo; + echo "Error: No testable program names in target: "$target; + echo; exit 1 + fi +else cp ${srcdir}/Test-Order ./Test-Order ; #cp --no-clobber ${srcdir}/Test-Order ./Test-Order ; fi -#let array[5]=0 +echo -for t in `grep -v "^#" ./Test-Order | fgrep ".test"` +for tname in `grep -v "^#" ./Test-Order | fgrep ".test"` do -echo == $t == -${srcdir}/$t > ${t%.test}.out ; let result=$? +echo == $tname == + +# If running tests under valgrind, complete vg_command by prepending +# the valgrind output file, which is test-specific. + +if [ $VALGRIND_TESTS = "on" ] + then + vg_command="$vg_command_base --log-file=${valdir}/${tname%.test}.%p.vout" +fi + +# Execute a single test and test its result. + +PATH=${testpath} $vg_command ${srcdir}/$tname > ${tname%.test}.out; +let result=$? case $result in -0) cmp -s ${t%.test}.out ${srcdir}/${t%.test}.ok ; +0) cmp -s ${tname%.test}.out ${srcdir}/${tname%.test}.ok ; if [ $? -eq 0 ] - then let result=0; rm ${t%.test}.out ; + then let result=0; rm ${tname%.test}.out ; else let result=1; - grep "^##" ${srcdir}/$t # Print failure message. - fi - let testable=1 ;; -80) let result=4 ; let testable=0;; -*) let result=1 ; let testable=1;; + grep "^##" ${srcdir}/$tname # Print failure message. + fi ;; +80) let result=4 ;; +*) let result=1 ;; esac # Report whether a single test succeeded or failed. # Increment counters. -echo $t: ${status[${result}]}; echo +echo $tname: ${status[${result}]}; echo let array[${result}]=${array[${result}]}+1 -let array[5]=${array[5]}+$testable +let total_scripts=${total_scripts}+1 done +# Erase temporary bin directory and its contents. + +rm -rf ${srcdir}/bin + # Erase temporary directory and its contents, if it was created. @@ -185,13 +285,16 @@ fi echo "Test summary:" echo ================== -for s in 0 1 2 3 4 5 +for s in 0 1 2 3 4 do - if [[ ${array[${s}]} -gt 0 || s -eq 1 || s -eq 5 ]] + if [[ ${array[${s}]} -gt 0 || s -eq 1 ]] then echo ${status[${s}]} ${array[${s}]} fi done +let total_testable=${total_scripts}-${array[4]} +echo "TOTAL TESTABLE" $total_testable + echo ================== echo "All tests done." date -R -u @@ -199,7 +302,7 @@ date -R -u # Exit with status 0 if all possible tests succeeded, 1 otherwise. -if [[ ${array[0]} -eq ${array[5]} ]] +if [[ ${array[0]} -eq ${total_testable} ]] then exit 0 else exit 1 fi diff --git a/test/Makefile b/test/Makefile index 4d44285f..9b7ab047 100644 --- a/test/Makefile +++ b/test/Makefile @@ -12,8 +12,12 @@ PROGS = testrandom all: $(PROGS) -PORTBINARIES = testrandom -OBJECTS = $(PORTBINARIES:%=%.o) +testrandom.o: testrandom.c + $(CC_FOR_BUILD) -c -o $@ $(CFLAGS_FOR_BUILD) $< + +testrandom: testrandom.o + $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $< + OMIT_TEST_RULE = 1 include $(SRCDIR)/common.mk diff --git a/test/Test-Order b/test/Test-Order index 3ab897ca..064daf94 100644 --- a/test/Test-Order +++ b/test/Test-Order @@ -1,6 +1,7 @@ # General test all-in-place.test +legacy-names.test # Generator tests @@ -115,8 +116,10 @@ gem-roundtrip.test gif-roundtrip.test gif-quant-roundtrip.test hdiff-roundtrip.test +ilbm-roundtrip.test jbig-roundtrip.test leaf-roundtrip.test +macp-roundtrip.test mda-roundtrip.test mgr-roundtrip.test mrf-roundtrip.test diff --git a/test/all-in-place.ok b/test/all-in-place.ok index 63a0f232..c58eb024 100644 --- a/test/all-in-place.ok +++ b/test/all-in-place.ok @@ -4,7 +4,6 @@ atktopbm: ok avstopam: ok bioradtopgm: ok bmptopnm: ok -bmptoppm: ok brushtopbm: ok cameratopam: ok cistopbm: ok @@ -15,13 +14,11 @@ eyuvtoppm: ok fitstopnm: ok fstopgm: ok g3topbm: ok -gemtopbm: ok gemtopnm: ok giftopnm: ok gouldtoppm: ok hdifftopam: ok hipstopgm: ok -icontopbm: ok ilbmtoppm: ok imgtoppm: ok infotopam: ok @@ -43,6 +40,7 @@ pambackground: ok pambayer: ok pamchannel: ok pamcomp: ok +pamcrater: ok pamcut: ok pamdeinterlace: ok pamdepth: ok @@ -53,7 +51,7 @@ pamendian: ok pamenlarge: ok pamexec: ok pamfile: ok -pamfixtrunc: ok +pamfix: ok pamflip: ok pamfunc: ok pamgauss: ok @@ -72,6 +70,7 @@ pamrgbatopng: ok pamrubber: ok pamscale: ok pamseq: ok +pamshadedrelief: ok pamsharpmap: ok pamsharpness: ok pamsistoaglyph: ok @@ -105,6 +104,7 @@ pamtouil: ok pamtowinicon: ok pamtoxvmini: ok pamundice: ok +pamvalidate: ok pamwipeout: ok pamx: ok pbmclean: ok @@ -132,7 +132,6 @@ pbmtog3: ok pbmtogem: ok pbmtogo: ok pbmtoibm23xx: ok -pbmtoicon: ok pbmtolj: ok pbmtoln03: ok pbmtolps: ok @@ -161,9 +160,7 @@ pdbimgtopam: ok pfmtopam: ok pgmabel: ok pgmbentley: ok -pamcrater: ok pgmdeshadow: ok -pgmedge: ok pgmenhance: ok pgmhist: ok pgmkernel: ok @@ -172,10 +169,7 @@ pgmmedian: ok pgmminkowski: ok pgmmorphconv: ok pgmnoise: ok -pgmnorm: ok -pgmoil: ok pgmramp: ok -pgmslice: ok pgmtexture: ok pgmtofs: ok pgmtolispm: ok @@ -190,24 +184,15 @@ picttoppm: ok pjtoppm: ok pktopbm: ok pngtopam: ok -pngtopnm: ok pnmalias: ok -pnmarith: ok pnmcat: ok pnmcolormap: ok -pnmcomp: ok pnmconvol: ok pnmcrop: ok -pnmcut: ok -pnmdepth: ok -pnmenlarge: ok -pnmfile: ok -pnmflip: ok pnmgamma: ok pnmhisteq: ok pnmhistmap: ok pnmindex: ok -pnminterp: ok pnminvert: ok pnmmercator: ok pnmmontage: ok @@ -218,28 +203,23 @@ pnmpaste: ok pnmpsnr: ok pnmremap: ok pnmrotate: ok -pnmscale: ok pnmscalefixed: ok pnmshear: ok pnmsmooth: ok -pnmsplit: ok pnmstitch: ok pnmtile: ok pnmtoddif: ok pnmtofiasco: ok -pnmtofits: ok pnmtojbig: ok pnmtojpeg: ok pnmtopalm: ok pnmtopclxl: ok pnmtopng: ok -pnmtopnm: ok pnmtops: ok pnmtorast: ok pnmtorle: ok pnmtosgi: ok pnmtosir: ok -pnmtotiff: ok pnmtotiffcmyk: ok pnmtoxwd: ok ppm3d: ok @@ -262,7 +242,6 @@ ppmhist: ok ppmlabel: ok ppmmake: ok ppmmix: ok -ppmnorm: ok ppmntsc: ok ppmpat: ok ppmrelief: ok @@ -275,14 +254,11 @@ ppmtoarbtxt: ok ppmtoascii: ok ppmtobmp: ok ppmtoeyuv: ok -ppmtogif: ok ppmtoicr: ok ppmtoilbm: ok -ppmtojpeg: ok ppmtoleaf: ok ppmtolj: ok ppmtomitsu: ok -ppmtompeg: ok ppmtoneo: ok ppmtopcx: ok ppmtopgm: ok @@ -296,7 +272,6 @@ ppmtorgb3: ok ppmtosixel: ok ppmtospu: ok ppmtoterm: ok -ppmtouil: ok ppmtowinicon: ok ppmtoxpm: ok ppmtoyuv: ok @@ -343,15 +318,10 @@ fiascotopnm: ok manweb: ok pnmmargin: ok anytopnm: ok -pbmtox10bm: ok -pnmnoraw: ok -pnmtoplainpnm: ok ppmtomap: ok ppmshadow: ok pnmquant: ok pnmquantall: ok -ppmquant: ok -ppmquantall: ok ppmrainbow: ok ppmfade: ok pamstretch-gen: ok diff --git a/test/all-in-place.test b/test/all-in-place.test index d307459a..79459f7a 100755 --- a/test/all-in-place.test +++ b/test/all-in-place.test @@ -3,6 +3,7 @@ # We test by actually running all the executables. +# Failure message # See Netpbm Library Prerequisites # http://netpbm.sourceforge.net/prereq.html # if make succeeds but this test fails. @@ -15,21 +16,20 @@ function testExitStatus () { # $3: actual exit status case $3 in - $2) echo $1": ok" ;; - 126) if [ ! -z "${PBM_TESTPREFIX}" ] && \ - [ -d "${PBM_TESTPREFIX}" ] && \ - [ ! -x "${PBM_TESTPREFIX}/$1" ] + 126) if [ ! -x $1 ] then echo $1": NOT EXECUTABLE"; else echo $1": ERROR: "$3; echo $1": error: "$3 1>&2 ; fi ;; - 127) if [ ! -z "${PBM_TESTPREFIX}" ] && \ - [ -d "${PBM_TESTPREFIX}" ] && \ - [ ! -f "${PBM_TESTPREFIX}/$1" ] + 127) type -p $1 > /dev/null + if [ $? -ne 0 ] then echo $1": NO SUCH FILE"; else echo $1": ERROR: "$3; echo $1": error: "$3 1>&2 ; fi ;; + 88) echo $1": NO SUCH FILE" ;; + $2) echo $1": ok" ;; *) echo $1": ERROR: "$3; echo $1": error: "$3 1>&2 ;; esac + } @@ -43,7 +43,6 @@ ordinary_testprogs="\ avstopam \ bioradtopgm \ bmptopnm \ - bmptoppm \ brushtopbm \ cameratopam \ cistopbm \ @@ -54,13 +53,11 @@ ordinary_testprogs="\ fitstopnm \ fstopgm \ g3topbm \ - gemtopbm \ gemtopnm \ giftopnm \ gouldtoppm \ hdifftopam \ hipstopgm \ - icontopbm \ ilbmtoppm \ imgtoppm \ infotopam \ @@ -82,6 +79,7 @@ ordinary_testprogs="\ pambayer \ pamchannel \ pamcomp \ + pamcrater \ pamcut \ pamdeinterlace \ pamdepth \ @@ -92,7 +90,7 @@ ordinary_testprogs="\ pamenlarge \ pamexec \ pamfile \ - pamfixtrunc \ + pamfix \ pamflip \ pamfunc \ pamgauss \ @@ -111,6 +109,7 @@ ordinary_testprogs="\ pamrubber \ pamscale \ pamseq \ + pamshadedrelief \ pamsharpmap \ pamsharpness \ pamsistoaglyph \ @@ -144,6 +143,7 @@ ordinary_testprogs="\ pamtowinicon \ pamtoxvmini \ pamundice \ + pamvalidate \ pamwipeout \ pamx \ pbmclean \ @@ -171,7 +171,6 @@ ordinary_testprogs="\ pbmtogem \ pbmtogo \ pbmtoibm23xx \ - pbmtoicon \ pbmtolj \ pbmtoln03 \ pbmtolps \ @@ -200,9 +199,7 @@ ordinary_testprogs="\ pfmtopam \ pgmabel \ pgmbentley \ - pamcrater \ pgmdeshadow \ - pgmedge \ pgmenhance \ pgmhist \ pgmkernel \ @@ -211,10 +208,7 @@ ordinary_testprogs="\ pgmminkowski \ pgmmorphconv \ pgmnoise \ - pgmnorm \ - pgmoil \ pgmramp \ - pgmslice \ pgmtexture \ pgmtofs \ pgmtolispm \ @@ -229,24 +223,15 @@ ordinary_testprogs="\ pjtoppm \ pktopbm \ pngtopam \ - pngtopnm \ pnmalias \ - pnmarith \ pnmcat \ pnmcolormap \ - pnmcomp \ pnmconvol \ pnmcrop \ - pnmcut \ - pnmdepth \ - pnmenlarge \ - pnmfile \ - pnmflip \ pnmgamma \ pnmhisteq \ pnmhistmap \ pnmindex \ - pnminterp \ pnminvert \ pnmmercator \ pnmmontage \ @@ -257,28 +242,23 @@ ordinary_testprogs="\ pnmpsnr \ pnmremap \ pnmrotate \ - pnmscale \ pnmscalefixed \ pnmshear \ pnmsmooth \ - pnmsplit \ pnmstitch \ pnmtile \ pnmtoddif \ pnmtofiasco \ - pnmtofits \ pnmtojbig \ pnmtojpeg \ pnmtopalm \ pnmtopclxl \ pnmtopng \ - pnmtopnm \ pnmtops \ pnmtorast \ pnmtorle \ pnmtosgi \ pnmtosir \ - pnmtotiff \ pnmtotiffcmyk \ pnmtoxwd \ ppm3d \ @@ -301,7 +281,6 @@ ordinary_testprogs="\ ppmlabel \ ppmmake \ ppmmix \ - ppmnorm \ ppmntsc \ ppmpat \ ppmrelief \ @@ -314,14 +293,11 @@ ordinary_testprogs="\ ppmtoascii \ ppmtobmp \ ppmtoeyuv \ - ppmtogif \ ppmtoicr \ ppmtoilbm \ - ppmtojpeg \ ppmtoleaf \ ppmtolj \ ppmtomitsu \ - ppmtompeg \ ppmtoneo \ ppmtopcx \ ppmtopgm \ @@ -335,7 +311,6 @@ ordinary_testprogs="\ ppmtosixel \ ppmtospu \ ppmtoterm \ - ppmtouil \ ppmtowinicon \ ppmtoxpm \ ppmtoyuv \ @@ -382,7 +357,7 @@ ordinary_testprogs="\ for i in $ordinary_testprogs do - ${PBM_TESTPREFIX}$i --version 2>&1 | \ + $i --version 2>&1 | \ egrep -v \ "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ 1>&2; @@ -390,28 +365,24 @@ for i in $ordinary_testprogs done - # Test fiascotopnm, which has a unique -v flag. - -${PBM_TESTPREFIX}fiascotopnm -v 2> /dev/null +fiascotopnm -v 2> /dev/null testExitStatus fiascotopnm 2 $? - # Test manweb and pnmmargin, which have --help. - -${PBM_TESTPREFIX}manweb --help > /dev/null +manweb --help > /dev/null testExitStatus manweb 0 $? -${PBM_TESTPREFIX}pnmmargin --help 2> /dev/null +pnmmargin --help 2> /dev/null testExitStatus pnmmargin 1 $? - -# Test anytopnm, pbmtox10bm, pnmnoraw, pnmquant, pnmquantall, -# pnmtoplainpnm, ppmquantall, ppmrainbow, ppmshadow, ppmtomap +# Test anytopnm, pnmnoraw, pnmquant, pnmquantall +# ppmrainbow, ppmshadow, ppmtomap # with trivial input. +$i ${tmpdir}/test.pbm > /dev/null 2> /dev/null; tmpdir=${tmpdir:-/tmp} test_pbm=${tmpdir}/test.pbm @@ -421,50 +392,37 @@ P1 1 EOF -for i in anytopnm pbmtox10bm pnmnoraw pnmtoplainpnm ppmtomap ppmshadow +for i in anytopnm ppmtomap ppmshadow do - ${PBM_TESTPREFIX}$i ${test_pbm} > /dev/null 2> /dev/null; + $i ${tmpdir}/test.pbm > /dev/null 2> /dev/null; testExitStatus $i 0 $? done -for i in pnmquant pnmquantall ppmquant ppmquantall +for i in pnmquant pnmquantall do - ${PBM_TESTPREFIX}$i 2 ${test_pbm} > /dev/null 2> /dev/null; + $i 2 ${tmpdir}/test.pbm > /dev/null 2> /dev/null; testExitStatus $i 0 $? done rm ${test_pbm} - -${PBM_TESTPREFIX}ppmrainbow rgb:00/00/00 rgb:ff/ff/ff \ + ppmrainbow rgb:00/00/00 rgb:ff/ff/ff \ -tmpdir=${tmpdir} -width=2 -height=2 > /dev/null testExitStatus ppmrainbow 0 $? - # Test ppmfade with corrupt input. # Prevent the creation of output files by setting base to /dev/null. # Exit status should be 50. - -${PBM_TESTPREFIX}ppmfade -f /dev/zero -base /dev/null > /dev/null 2> /dev/null + ppmfade -f /dev/zero -base /dev/null > /dev/null 2> /dev/null testExitStatus ppmfade 50 $? - # Test pamstretch-gen and pcdovtoppm with no input. # These two programs write a usage message on standout in this case. # Exit status should be 1. for i in pamstretch-gen pcdovtoppm do - ${PBM_TESTPREFIX}$i > /dev/null + $i > /dev/null testExitStatus $i 1 $? done - - - -# We do not test hpcdtoppm. -# This is a stand-in which announces the absence of the real hpcdtoppm. -# TODO: Provide for the case in which the real hpcdtoppm is encountered. - -#${PBM_TESTPREFIX}hpcdtoppm 2> /dev/null -# testExitStatus hpcdtoppm 1 $? diff --git a/test/atari-roundtrip.test b/test/atari-roundtrip.test index 85929a8b..413438a1 100755 --- a/test/atari-roundtrip.test +++ b/test/atari-roundtrip.test @@ -1,15 +1,7 @@ +#! /bin/bash # This script tests: ppmtopi1 pi1toppm ppmtoneo neotoppm -# Also requires: pgmramp pamscale pbmmake rgb3toppm - - alias ppmtopi1="${PBM_TESTPREFIX}ppmtopi1" - alias pi1toppm="${PBM_TESTPREFIX}pi1toppm" - alias ppmtoneo="${PBM_TESTPREFIX}ppmtoneo" - alias neotoppm="${PBM_TESTPREFIX}neotoppm" - alias pgmramp="${PBM_BINPREFIX}pgmramp" - alias pamscale="${PBM_BINPREFIX}pamscale" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias rgb3toppm="${PBM_BINPREFIX}rgb3toppm" - shopt -s expand_aliases +# Also requires: pgmramp pamscale pbmmake pamenlarge rgb3toppm pamdepth + # Atari pi1 and neo files have the following characteristics: # Size: 320x200 diff --git a/test/atk-roundtrip.test b/test/atk-roundtrip.test index 3d15eec4..6db3df6d 100755 --- a/test/atk-roundtrip.test +++ b/test/atk-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pbmtoatk atktopbm -# Also requires: +# Also requires: - alias atktopbm="${PBM_TESTPREFIX}atktopbm" - alias pbmtoatk="${PBM_TESTPREFIX}pbmtoatk" - shopt -s expand_aliases # Should print 2425386270 41, cksum of testgrid.pbm pbmtoatk testgrid.pbm | atktopbm | cksum diff --git a/test/avs-roundtrip.test b/test/avs-roundtrip.test index 44b4d8a4..042ce91e 100755 --- a/test/avs-roundtrip.test +++ b/test/avs-roundtrip.test @@ -2,10 +2,6 @@ # This script tests: pamtoavs avstopam # Also requires: pamtopnm - alias avstopam="${PBM_TESTPREFIX}avstopam" - alias pamtoavs="${PBM_TESTPREFIX}pamtoavs" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - shopt -s expand_aliases # Should produce 1926073387 101484, cksum of testimg.ppm pamtoavs testimg.ppm | \ diff --git a/test/bmp-roundtrip.test b/test/bmp-roundtrip.test index 291f2669..be9a4548 100755 --- a/test/bmp-roundtrip.test +++ b/test/bmp-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: bmptopnm ppmtobmp -# Also requires: +# Also requires: - alias bmptopnm="${PBM_TESTPREFIX}bmptopnm" - alias ppmtobmp="${PBM_TESTPREFIX}ppmtobmp" - shopt -s expand_aliases ppmtobmp testimg.ppm | bmptopnm | cksum ppmtobmp testgrid.pbm | bmptopnm | cksum diff --git a/test/cis-roundtrip.test b/test/cis-roundtrip.test index 895fe60e..62fcc3b9 100755 --- a/test/cis-roundtrip.test +++ b/test/cis-roundtrip.test @@ -1,13 +1,7 @@ #! /bin/bash # This script tests: pbmtocis cistopbm -# Also requires: pbmmake pamenlarge pamcut +# Also requires: pbmmake pamcut - alias pbmtocis="${PBM_TESTPREFIX}pbmtocis" - alias cistopbm="${PBM_TESTPREFIX}cistopbm" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pamenlarge="${PBM_BINPREFIX}pamenlarge" - alias pamcut="${PBM_BINPREFIX}pamcut" - shopt -s expand_aliases # Output images produced by pbmtocis are of fixed size, # either 128x96 or 256x192. diff --git a/test/cmuw-roundtrip.test b/test/cmuw-roundtrip.test index ebb5eecf..e52adb70 100755 --- a/test/cmuw-roundtrip.test +++ b/test/cmuw-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pbmtocmuwm cmuwmtopbm -# Also requires: +# Also requires: - alias cmuwmtopbm="${PBM_TESTPREFIX}cmuwmtopbm" - alias pbmtocmuwm="${PBM_TESTPREFIX}pbmtocmuwm" - shopt -s expand_aliases # Should print 2425386270 41, cksum of testgrid.pbm pbmtocmuwm testgrid.pbm | cmuwmtopbm | cksum diff --git a/test/cut-paste-roundtrip.test b/test/cut-paste-roundtrip.test index 15e53219..9f466020 100755 --- a/test/cut-paste-roundtrip.test +++ b/test/cut-paste-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pamcut pnmpaste -# Also requires: +# Also requires: - alias pamcut="${PBM_TESTPREFIX}pamcut" - alias pnmpaste="${PBM_TESTPREFIX}pnmpaste" - shopt -s expand_aliases pamcut 50 40 100 70 testimg.ppm | \ pnmpaste -replace - 50 40 testimg.ppm | cksum diff --git a/test/eyuvtoppm.test b/test/eyuvtoppm.test index 79c30237..b28b4539 100755 --- a/test/eyuvtoppm.test +++ b/test/eyuvtoppm.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: eyuvtoppm -# Also requires: +# Also requires: - alias eyuvtoppm="${PBM_TESTPREFIX}eyuvtoppm" - shopt -s expand_aliases # Should produce 1719878124 253455 diff --git a/test/facesaver-roundtrip.test b/test/facesaver-roundtrip.test index 76de380d..f4b8f069 100755 --- a/test/facesaver-roundtrip.test +++ b/test/facesaver-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pgmtofs fstopgm -# Also requires: pamchannel +# Also requires: pamchannel pamtopnm - alias fstopgm="${PBM_TESTPREFIX}fstopgm" - alias pgmtofs="${PBM_TESTPREFIX}pgmtofs" - shopt -s expand_aliases # Should produce 1571496937 33838, cksum of testimg.red diff --git a/test/fits-roundtrip.test b/test/fits-roundtrip.test index 65589823..e793df9a 100755 --- a/test/fits-roundtrip.test +++ b/test/fits-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pamtofits fitstopnm -# Also requires: +# Also requires: - alias fitstopnm="${PBM_TESTPREFIX}fitstopnm" - alias pamtofits="${PBM_TESTPREFIX}pamtofits" - shopt -s expand_aliases # Should produce 1926073387 101484, cksum of testimg.ppm pamtofits testimg.ppm | fitstopnm | cksum diff --git a/test/g3-roundtrip.test b/test/g3-roundtrip.test index 323a26bf..47e20e1d 100755 --- a/test/g3-roundtrip.test +++ b/test/g3-roundtrip.test @@ -2,10 +2,6 @@ # This script tests: g3topbm pbmtog3 # Also requires: pnmcrop - alias g3topbm="${PBM_TESTPREFIX}g3topbm" - alias pbmtog3="${PBM_TESTPREFIX}pbmtog3" - alias pnmcrop="${PBM_BINPREFIX}pnmcrop" - shopt -s expand_aliases pbmtog3 -nofixedwidth testgrid.pbm | \ g3topbm -width=14 | cmp -s - testgrid.pbm diff --git a/test/gem-roundtrip.test b/test/gem-roundtrip.test index 97f894c2..0fce59db 100755 --- a/test/gem-roundtrip.test +++ b/test/gem-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash -# This script tests: pbmtogem gemtopbm -# Also requires: gemtopnm +# This script tests: pbmtogem gemtopnm +# Also requires: - alias gemtopbm="${PBM_TESTPREFIX}gemtopbm" - alias pbmtogem="${PBM_TESTPREFIX}pbmtogem" - shopt -s expand_aliases # Should print 2425386270 41, cksum of testgrid.pbm -pbmtogem testgrid.pbm | gemtopbm | cksum +pbmtogem testgrid.pbm | gemtopnm | cksum diff --git a/test/gif-quant-roundtrip.test b/test/gif-quant-roundtrip.test index 7f99ca6e..8b911740 100755 --- a/test/gif-quant-roundtrip.test +++ b/test/gif-quant-roundtrip.test @@ -1,11 +1,7 @@ #! /bin/bash # This script tests: giftopnm pamtogif pnmquant -# Also requires: pnmcolormap pnmremap +# Also requires: - alias giftopnm="${PBM_TESTPREFIX}giftopnm" - alias pamtogif="${PBM_TESTPREFIX}pamtogif" - alias pnmquant="${PBM_TESTPREFIX}pnmquant" - shopt -s expand_aliases # Should print 0 @@ -20,4 +16,3 @@ pamtogif ${quant_ppm} | giftopnm | \ echo $? rm ${quant_ppm} - diff --git a/test/gif-roundtrip.test b/test/gif-roundtrip.test index 8d1a9bbe..a6d0ec4c 100755 --- a/test/gif-roundtrip.test +++ b/test/gif-roundtrip.test @@ -1,14 +1,7 @@ #! /bin/bash # This script tests: giftopnm pamtogif -# Also requires: ppmtorgb3 rgb3toppm pbmmake +# Also requires: ppmtorgb3 rgb3toppm pbmmake pnminvert - alias giftopnm="${PBM_TESTPREFIX}giftopnm" - alias pamtogif="${PBM_TESTPREFIX}pamtogif" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias ppmtorgb3="${PBM_BINPREFIX}ppmtorgb3" - alias rgb3toppm="${PBM_BINPREFIX}rgb3toppm" - alias pnminvert="${PBM_BINPREFIX}pnminvert" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} @@ -20,7 +13,7 @@ tmpdir=${tmpdir:-/tmp} test_ppm=${tmpdir}/testimg.ppm cp testimg.ppm ${tmpdir} && -ppmtorgb3 ${test_ppm} && +ppmtorgb3 ${test_ppm} test_red=${tmpdir}/testimg.red test_grn=${tmpdir}/testimg.grn diff --git a/test/hdiff-roundtrip.test b/test/hdiff-roundtrip.test index 3a27a955..a4a4a906 100755 --- a/test/hdiff-roundtrip.test +++ b/test/hdiff-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: hdifftopam pamtohdiff -# Also requires: +# Also requires: - alias hdifftopam="${PBM_TESTPREFIX}hdifftopam" - alias pamtohdiff="${PBM_TESTPREFIX}pamtohdiff" - shopt -s expand_aliases pamtohdiff testimg.ppm | \ hdifftopam -pnm | cksum diff --git a/test/ilbm-roundtrip.ok b/test/ilbm-roundtrip.ok index 82eac5a8..cd357916 100644 --- a/test/ilbm-roundtrip.ok +++ b/test/ilbm-roundtrip.ok @@ -1 +1,2 @@ 1926073387 101484 +984199586 101484 diff --git a/test/ilbm-roundtrip.test b/test/ilbm-roundtrip.test index 495daf53..a13fc8be 100755 --- a/test/ilbm-roundtrip.test +++ b/test/ilbm-roundtrip.test @@ -2,13 +2,6 @@ # This script tests: ppmtoilbm ilbmtoppm # Also requires: pamseq pamdepth pamtopnm pnmremap - alias ppmtoilbm="${PBM_TESTPREFIX}ppmtoilbm" - alias ilbmtoppm="${PBM_TESTPREFIX}ilbmtoppm" - alias pamseq="${PBM_BINPREFIX}pamseq" - alias pamdepth="${PBM_BINPREFIX}pamdepth" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - alias pnmremap="${PBM_BINPREFIX}pnmremap" - shopt -s expand_aliases #Test. Should produce 1926073387 101484 ppmtoilbm testimg.ppm | ilbmtoppm | cksum @@ -16,5 +9,3 @@ ppmtoilbm testimg.ppm | ilbmtoppm | cksum #Test. Should print 984199586 101484 pamseq 3 5 -tupletype=RGB | pamdepth 255 | pamtopnm | \ pnmremap -mapfile=- testimg.ppm | ppmtoilbm | ilbmtoppm | cksum - - diff --git a/test/jbig-roundtrip.test b/test/jbig-roundtrip.test index 9ce23f51..5e96a001 100755 --- a/test/jbig-roundtrip.test +++ b/test/jbig-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pnmtojbig jbigtopnm -# Also requires: pamchannel +# Also requires: pamchannel pamtopnm - alias pnmtojbig="${PBM_TESTPREFIX}pnmtojbig" - alias jbigtopnm="${PBM_TESTPREFIX}jbigtopnm" - shopt -s expand_aliases # Test 1. Should print 2425386270 41 pnmtojbig testgrid.pbm | jbigtopnm | cksum diff --git a/test/leaf-roundtrip.test b/test/leaf-roundtrip.test index f8ac11d4..5628ed01 100755 --- a/test/leaf-roundtrip.test +++ b/test/leaf-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: ppmtoleaf leaftoppm -# Also requires: +# Also requires: - alias leaftoppm="${PBM_TESTPREFIX}leaftoppm" - alias ppmtoleaf="${PBM_TESTPREFIX}ppmtoleaf" - shopt -s expand_aliases # Should produce 1926073387 101484, cksum of testimg.ppm ppmtoleaf testimg.ppm | leaftoppm | cksum diff --git a/test/legacy-names.ok b/test/legacy-names.ok new file mode 100644 index 00000000..57343afa --- /dev/null +++ b/test/legacy-names.ok @@ -0,0 +1,36 @@ +bmptoppm: ok +gemtopbm: ok +icontopbm: ok +pamfixtrunc: ok +pbmtoicon: ok +pgmedge: ok +pgmnorm: ok +pgmoil: ok +pgmslice: ok +pngtopnm: ok +pnmarith: ok +pnmcomp: ok +pnmcut: ok +pnmdepth: ok +pnmenlarge: ok +pnmfile: ok +pnmflip: ok +pnminterp: ok +pnmscale: ok +pnmsplit: ok +pnmtofits: ok +pnmtopnm: ok +pnmtotiff: ok +ppmnorm: ok +ppmtogif: ok +ppmtojpeg: ok +ppmtompeg: ok +ppmtotga: ok +ppmtouil: ok +pgmcrater: ok +pbmtox10bm: ok +pnmnoraw: ok +pnmtoplainpnm: ok +ppmquant: ok +ppmquantall: ok +hpcdtoppm: ok diff --git a/test/legacy-names.test b/test/legacy-names.test new file mode 100755 index 00000000..9940f207 --- /dev/null +++ b/test/legacy-names.test @@ -0,0 +1,131 @@ +#! /bin/bash +# Tests whether the executable files listed below are in place. + +# We test with the methods used in all-in-place.test. +# The sole exception is hpcdtoppm. We just confirm that it exists. + +# Failure message +## If all-in-place.test succeeds and this test fails, a likely cause is a +## problem with symbolic links. +## +## Important: This test checks obsoleted names. +## Programs here do not appear in other tests. + + +# Skip this test if CHECK_TYPE = tree + +if [ ${CHECK_TYPE} = tree ] + then echo "Skipping." 1>&2 + exit 80; +fi + + +function testExitStatus () { + +# This function takes 3 positional parameters: +# $1: filename +# $2: expected exit status (In some cases we expect error.) +# $3: actual exit status + + case $3 in + 126) if [ ! -x $1 ] + then echo $1": NOT EXECUTABLE"; + else echo $1": ERROR: "$3; echo $1": error: "$3 1>&2 ; + fi ;; + 127) type -p $1 > /dev/null + if [ $? -ne 0 ] + then echo $1": NO SUCH FILE"; + else echo $1": ERROR: "$3; echo $1": error: "$3 1>&2 ; + fi ;; + 88) echo $1": NO SUCH FILE" ;; + $2) echo $1": ok" ;; + *) echo $1": ERROR: "$3; echo $1": error: "$3 1>&2 ;; + esac + +} + + +# Test programs which have the --version flag. +# See showVersion() in lib/libpm.c for the standard version announcement. + +ordinary_testprogs="\ + bmptoppm \ + gemtopbm \ + icontopbm \ + pamfixtrunc \ + pbmtoicon \ + pgmedge \ + pgmnorm \ + pgmoil \ + pgmslice \ + pngtopnm \ + pnmarith \ + pnmcomp \ + pnmcut \ + pnmdepth \ + pnmenlarge \ + pnmfile \ + pnmflip \ + pnminterp \ + pnmscale \ + pnmsplit \ + pnmtofits \ + pnmtopnm \ + pnmtotiff \ + ppmnorm \ + ppmtogif \ + ppmtojpeg \ + ppmtompeg \ + ppmtotga \ + ppmtouil \ +" + +for i in $ordinary_testprogs + do + $i --version 2>&1 | \ + egrep -v \ + "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ + 1>&2; + testExitStatus $i 0 ${PIPESTATUS[0]} + done + + +# Test pgmcrater + +pgmcrater -number 1 -xsize 15 -ysize 15 -randomseed 1 > /dev/null +testExitStatus pgmcrater 0 $? + + +# Test pbmtox10bm, pnmnoraw, pnmtoplainpnm, ppmquantall, ppmrainbow +# with trivial input. + +$i ${tmpdir}/test.pbm > /dev/null 2> /dev/null; +tmpdir=${tmpdir:-/tmp} +test_pbm=${tmpdir}/test.pbm + +cat > ${test_pbm} < /dev/null 2> /dev/null; + testExitStatus $i 0 $? + done + +for i in ppmquant ppmquantall + do + $i 2 ${tmpdir}/test.pbm > /dev/null 2> /dev/null; + testExitStatus $i 0 $? + done + + +rm ${test_pbm} + + +# Test hpcdtoppm. Simply confirm its existence. + +type -p hpcdtoppm > /dev/null +testExitStatus hpcdtoppm 0 $? diff --git a/test/macp-roundtrip.test b/test/macp-roundtrip.test index 39228e5a..2d7f6ce3 100755 --- a/test/macp-roundtrip.test +++ b/test/macp-roundtrip.test @@ -1,12 +1,7 @@ #! /bin/bash # This script tests: pbmtomacp macptopbm -# Also requires: pamcrop pbmmake +# Also requires: pnmcrop pbmmake - alias pbmtomacp="${PBM_TESTPREFIX}pbmtomacp" - alias macptopbm="${PBM_TESTPREFIX}macptopbm" - alias pnmcrop="${PBM_BINPREFIX}pnmcrop" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - shopt -s expand_aliases #Test 1. Should produce 2425386270 41 pbmtomacp testgrid.pbm | macptopbm | pnmcrop | cksum diff --git a/test/mda-roundtrip.test b/test/mda-roundtrip.test index 3bde61ee..58376f3f 100755 --- a/test/mda-roundtrip.test +++ b/test/mda-roundtrip.test @@ -2,14 +2,8 @@ # This script tests: pbmtomda mdatopbm # Also requires: pbmmake pnmpad pamcut - alias pbmtomda="${PBM_TESTPREFIX}pbmtomda" - alias mdatopbm="${PBM_TESTPREFIX}mdatopbm" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pnmpad="${PBM_BINPREFIX}pnmpad" - alias pamcut="${PBM_BINPREFIX}pamcut" - shopt -s expand_aliases -# Pbmtomda requires input width and height to be multiples of 8. +# Pbmtomda requires input width and height to be multiples of 8. # Test 1. Should print 1757803444 169 pbmmake -g 32 40 | pbmtomda | mdatopbm | cksum diff --git a/test/mgr-roundtrip.test b/test/mgr-roundtrip.test index 4f5fdd81..252ae996 100755 --- a/test/mgr-roundtrip.test +++ b/test/mgr-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pbmtomgr mgrtopbm -# Also requires: +# Also requires: - alias mgrtopbm="${PBM_TESTPREFIX}mgrtopbm" - alias pbmtomgr="${PBM_TESTPREFIX}pbmtomgr" - shopt -s expand_aliases # Should print 2425386270 41, cksum of testgrid.pbm pbmtomgr testgrid.pbm | mgrtopbm | cksum diff --git a/test/mrf-roundtrip.test b/test/mrf-roundtrip.test index 5b9f77f4..c9d8ce3a 100755 --- a/test/mrf-roundtrip.test +++ b/test/mrf-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pbmtomrf mrftopbm -# Also requires: +# Also requires: - alias mrftopbm="${PBM_TESTPREFIX}mrftopbm" - alias pbmtomrf="${PBM_TESTPREFIX}pbmtomrf" - shopt -s expand_aliases # Should print 2425386270 41, cksum of testgrid.pbm pbmtomrf testgrid.pbm | mrftopbm | cksum diff --git a/test/pad-crop-roundtrip.test b/test/pad-crop-roundtrip.test index ae19f7d5..c7780d68 100755 --- a/test/pad-crop-roundtrip.test +++ b/test/pad-crop-roundtrip.test @@ -2,9 +2,6 @@ # This script tests: pnmcrop pnmmargin # Also requires: pnmpad - alias pnmcrop="${PBM_TESTPREFIX}pnmcrop" - alias pnmmargin="${PBM_TESTPREFIX}pnmmargin" - shopt -s expand_aliases pnmmargin -white 10 testimg.ppm | \ pnmcrop | cksum diff --git a/test/pambackground.test b/test/pambackground.test index 58526fdd..522f4823 100755 --- a/test/pambackground.test +++ b/test/pambackground.test @@ -1,15 +1,7 @@ #! /bin/bash -# This script tests: pambackground -# Also requires: pamgradient pamseq pbmmake pnmmargin pnmremap pnmtile - - alias pambackground="${PBM_TESTPREFIX}pambackground" - alias pamgradient="${PBM_BINPREFIX}pamgradient" - alias pamseq="${PBM_BINPREFIX}pamseq" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pnmmargin="${PBM_BINPREFIX}pnmmargin" - alias pnmremap="${PBM_BINPREFIX}pnmremap" - alias pnmtile="${PBM_BINPREFIX}pnmtile" - shopt -s expand_aliases +# This script tests: pambackground +# Also requires: pamgradient pamseq pbmmake pnmmargin pnmremap pnmtile pnmpad + tmpdir=${tmpdir:-/tmp} diff --git a/test/pamchannel.test b/test/pamchannel.test index 9ac71f13..3529f4fe 100755 --- a/test/pamchannel.test +++ b/test/pamchannel.test @@ -2,9 +2,6 @@ # This script tests: pamchannel # Also requires: pamtopnm - alias pamchannel="${PBM_TESTPREFIX}pamchannel" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - shopt -s expand_aliases # Extract planes one by one. # Convert output to pgm to make it identical to ppmtorgb3 output. diff --git a/test/pamcrater.test b/test/pamcrater.test index cc937731..4d3858b9 100755 --- a/test/pamcrater.test +++ b/test/pamcrater.test @@ -2,14 +2,6 @@ # This script tests: pamcrater pamshadedrelief # Also requires: pamstack pamvalidate pamcut pamflip - alias pamcrater="${PBM_TESTPREFIX}pamcrater" - alias pamshadedrelief="${PBM_TESTPREFIX}pamshadedrelief" - alias pamstack="${PBM_BINPREFIX}pamstack" - alias pamvalidate="${PBM_BINPREFIX}pamvalidate" - alias pamcut="${PBM_BINPREFIX}pamcut" - alias pamflip="${PBM_BINPREFIX}pamflip" - - shopt -s expand_aliases # We use the undocumented --test and --radius options of pamcrater. # pamcrater --test --radius=N @@ -33,7 +25,7 @@ pamcrater --test --radius=100 > $test100_pam pamcrater --test --radius=150 > $test150_pam pamstack ${test10_pam} ${test50_pam} ${test100_pam} ${test150_pam} | - pamvalidate > ${test_pam} + pamvalidate > ${test_pam} for i in 1 10 70 do diff --git a/test/pamcut.test b/test/pamcut.test index 5a94de46..fd9185a3 100755 --- a/test/pamcut.test +++ b/test/pamcut.test @@ -1,18 +1,18 @@ #! /bin/bash # This script tests: pamcut pbmmake -# Also requires: +# Also requires: - alias pamcut="${PBM_TESTPREFIX}pamcut" - alias pbmmake="${PBM_TESTPREFIX}pbmmake" - shopt -s expand_aliases # Test 1. Should print 2958909756 124815 pamcut -top 0 -left 0 -width 260 -height 160 \ -pad testimg.ppm | cksum + # Test 2. Should print 1550940962 10933 pamcut -top 200 -left 120 -width 40 -height 40 \ -pad testimg.ppm | cksum + # Test 3. Should print 708474423 14 pamcut -top 5 -left 5 -bottom 5 -right 5 testimg.ppm | cksum -# Test 3. Should print 3412257956 129 + +# Test 4. Should print 3412257956 129 pbmmake -g 50 50 | pamcut 5 5 30 30 | cksum diff --git a/test/pamdepth-roundtrip.test b/test/pamdepth-roundtrip.test index 6330aaf9..0c7cb8b0 100755 --- a/test/pamdepth-roundtrip.test +++ b/test/pamdepth-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pamdepth pgmtopbm -# Also requires: +# Also requires: - alias pamdepth="${PBM_TESTPREFIX}pamdepth" - alias pgmtopbm="${PBM_TESTPREFIX}pgmtopbm" - shopt -s expand_aliases for i in 300 500 1023 4095 5000 16383 65535 do diff --git a/test/pamdice-roundtrip.test b/test/pamdice-roundtrip.test index 7b863bca..28997742 100755 --- a/test/pamdice-roundtrip.test +++ b/test/pamdice-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pamdice pamundice -# Also requires: +# Also requires: - alias pamdice="${PBM_TESTPREFIX}pamdice" - alias pamundice="${PBM_TESTPREFIX}pamundice" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} fname_stem=${tmpdir}/a @@ -13,4 +10,3 @@ pamdice testimg.ppm -outstem=${fname_stem} -width=50 -height=40 pamundice ${fname_stem}_%1d_%1a.ppm -down=4 -across=5 | cksum rm ${fname_stem}_?_?.ppm - diff --git a/test/pamditherbw.test b/test/pamditherbw.test index 1ac1391c..3f377f81 100755 --- a/test/pamditherbw.test +++ b/test/pamditherbw.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pamditherbw -# Also requires: pamchannel +# Also requires: pamchannel pamtopnm - alias pamditherbw="${PBM_TESTPREFIX}pamditherbw" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} test_red=${tmpdir}/testimg.red diff --git a/test/pamedge.test b/test/pamedge.test index d230424b..c63b30cc 100755 --- a/test/pamedge.test +++ b/test/pamedge.test @@ -2,13 +2,6 @@ # This script tests: pamedge # Also requires: pbmpscale pbmtext pgmtopbm pgmtopgm ppmtopgm - alias pamedge="${PBM_TESTPREFIX}pamedge" - alias pbmpscale="${PBM_BINPREFIX}pbmpscale" - alias pbmtext="${PBM_BINPREFIX}pbmtext" - alias pgmtopbm="${PBM_BINPREFIX}pgmtopbm" - alias pgmtopgm="${PBM_BINPREFIX}pgmtopgm" - alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm" - shopt -s expand_aliases pbmtext " F " -nom | pbmpscale 5 | \ pgmtopgm | pamedge | \ diff --git a/test/pamenlarge.test b/test/pamenlarge.test index ced156dd..3820f47e 100755 --- a/test/pamenlarge.test +++ b/test/pamenlarge.test @@ -2,11 +2,6 @@ # This script tests: pamenlarge # Also requires: pamchannel pamseq pamtopnm - alias pamenlarge="${PBM_TESTPREFIX}pamenlarge" - alias pamchannel="${PBM_TESTPREFIX}pamchannel" - alias pamseq="${PBM_TESTPREFIX}pamseq" - alias pamchannel="${PBM_TESTPREFIX}pamchannel" - shopt -s expand_aliases # Test 1. Should print 3424505894 913236 pamenlarge 3 testimg.ppm | cksum diff --git a/test/pamfile.test b/test/pamfile.test index 1c1d3d23..ac927172 100755 --- a/test/pamfile.test +++ b/test/pamfile.test @@ -1,14 +1,9 @@ #! /bin/bash # This script tests: pamfile -# Also requires: pamchannel +# Also requires: pamchannel pamtopnm - alias pamfile="${PBM_TESTPREFIX}pamfile" - shopt -s expand_aliases pamfile testimg.ppm pamfile testgrid.pbm pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | pamfile pamchannel -tupletype="GRAYSCALE" -infile=testimg.ppm 0 | pamfile - - - diff --git a/test/pamflip-roundtrip.test b/test/pamflip-roundtrip.test index 2b18eb8d..c5a34ad9 100755 --- a/test/pamflip-roundtrip.test +++ b/test/pamflip-roundtrip.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pamflip -# Also requires: +# Also requires: - alias pamflip="${PBM_TESTPREFIX}pamflip" - shopt -s expand_aliases pamflip -lr testimg.ppm | pamflip -lr | cksum pamflip -tb testimg.ppm | pamflip -tb | cksum diff --git a/test/pamflip1.test b/test/pamflip1.test index 0f60b72b..840cac73 100755 --- a/test/pamflip1.test +++ b/test/pamflip1.test @@ -1,12 +1,10 @@ #! /bin/bash # This script tests: pamflip -# Also requires: +# Also requires: - alias pamflip="${PBM_TESTPREFIX}pamflip" - shopt -s expand_aliases # Test 1. Should print 2116496681 101484 -pamflip -lr testimg.ppm | cksum +pamflip -lr testimg.ppm | cksum # Test 2. Should print 217037000 101484 pamflip -cw testimg.ppm | cksum # Test 3. Should print 2052917888 101484 diff --git a/test/pamflip2.test b/test/pamflip2.test index d9418b25..4dddb770 100755 --- a/test/pamflip2.test +++ b/test/pamflip2.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pamflip -# Also requires: +# Also requires: - alias pamflip="${PBM_TESTPREFIX}pamflip" - shopt -s expand_aliases # Failure message ## Failure with this test indicates a problem with pamflip transpositions diff --git a/test/pamseq.test b/test/pamseq.test index acc5d1b1..e7b8060d 100755 --- a/test/pamseq.test +++ b/test/pamseq.test @@ -1,8 +1,6 @@ #! /bin/bash # This script tests: pamseq -# Also requires: +# Also requires: - alias pamseq="${PBM_TESTPREFIX}pamseq" - shopt -s expand_aliases pamseq 1 255 | cksum diff --git a/test/pamslice-roundtrip.test b/test/pamslice-roundtrip.test index f17765d1..6cb5533f 100755 --- a/test/pamslice-roundtrip.test +++ b/test/pamslice-roundtrip.test @@ -1,13 +1,7 @@ #! /bin/bash # This script tests: pamslice pamdeinterlace -# Also requires: pamcut pnmtopnm pamflip +# Also requires: pamcut pamtopnm pamflip - alias pamslice="${PBM_TESTPREFIX}pamslice" - alias pamdeinterlace="${PBM_TESTPREFIX}pamdeinterlace" - alias pamcut="${PBM_BINPREFIX}pamcut" - alias pnmtopnm="${PBM_BINPREFIX}pnmtopnm" - alias pamflip="${PBM_BINPREFIX}pamflip" - shopt -s expand_aliases # Test 1. # Slice rows, one by one, out of testgrid.pbm. @@ -19,9 +13,9 @@ echo "14 16" seq 0 15 | while read i; do - pamslice -row=$i testgrid.pbm | \ - awk '{print $2}' | sed 'y/01/10/'; - done ) | pnmtopnm | cksum + pamslice -row=$i testgrid.pbm + done | awk '{print $2}' | sed 'y/01/10/' ) \ + | pamtopnm | cksum # Test 2. # Slice rows, one by one, out of ppm test image @@ -41,8 +35,9 @@ pamcut 50 50 49 33 testimg.ppm > ${test4933_ppm} echo "255" seq 0 32 | while read i; do - pamslice -row=$i ${test4933_ppm} | awk '{print $2, $3, $4}'; - done ) | pnmtopnm | cksum + pamslice -row=$i ${test4933_ppm} + done | awk '{print $2, $3, $4}' ) \ + | pamtopnm | cksum # Same as above test 2, but take cols instead of rows. # Should print 914327477 4864 @@ -52,8 +47,9 @@ pamcut 50 50 49 33 testimg.ppm > ${test4933_ppm} echo "255" seq 0 48 | while read i; do - pamslice -col=$i ${test4933_ppm} | awk '{print $2, $3, $4}'; - done ) | pamflip -xy | cksum + pamslice -col=$i ${test4933_ppm} + done | awk '{print $2, $3, $4}' ) \ + | pamflip -xy | cksum # Test 4. # Divide input image into two with pamdeinterlace and recombine. @@ -67,12 +63,13 @@ pamdeinterlace -takeeven ${test4933_ppm} > ${testeven_ppm} (echo "P3" echo "49 33" echo "255" - seq 0 15 | while read i; + ( seq 0 15 | while read i; do - pamslice -row=$i ${testeven_ppm} | awk '{print $2, $3, $4}'; - pamslice -row=$i ${testodd_ppm} | awk '{print $2, $3, $4}'; + pamslice -row=$i ${testeven_ppm} + pamslice -row=$i ${testodd_ppm} done - pamslice -row=16 ${testeven_ppm} | awk '{print $2, $3, $4}'; - ) | pnmtopnm | tee /tmp/z | cksum + pamslice -row=16 ${testeven_ppm}; + ) | awk '{print $2, $3, $4}' ) \ + | pamtopnm | cksum rm ${test4933_ppm} ${testodd_ppm} ${testeven_ppm} diff --git a/test/pamsumm.test b/test/pamsumm.test index 9697a2b9..a99dea0e 100755 --- a/test/pamsumm.test +++ b/test/pamsumm.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pamsumm -# Also requires: +# Also requires: - alias pamsumm="${PBM_TESTPREFIX}pamsumm" - shopt -s expand_aliases for type in -sum -min -max -mean do diff --git a/test/pamtopam.test b/test/pamtopam.test index e2ec5adf..394d9904 100755 --- a/test/pamtopam.test +++ b/test/pamtopam.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pamtopam -# Also requires: +# Also requires: - alias pamtopam="${PBM_TESTPREFIX}pamtopam" - shopt -s expand_aliases pamtopam < testimg.ppm | sed '/ENDHDR/q' pamtopam < testgrid.pbm | sed '/ENDHDR/q' diff --git a/test/pbmclean.test b/test/pbmclean.test index 5f324c5e..a8e469b1 100755 --- a/test/pbmclean.test +++ b/test/pbmclean.test @@ -2,11 +2,6 @@ # This script tests: pbmclean # Also requires: pbmmake pbmpage pnmmargin pnmpad - alias pbmclean="${PBM_TESTPREFIX}pbmclean" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pbmpage="${PBM_BINPREFIX}pbmpage" - alias pnmmargin="${PBM_BINPREFIX}pnmmargin" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} test_pbm=${tmpdir}/test.pbm diff --git a/test/pbmmake.test b/test/pbmmake.test index eb4b472d..4b18e3ea 100755 --- a/test/pbmmake.test +++ b/test/pbmmake.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pbmmake -# Also requires: +# Also requires: - alias pbmmake="${PBM_TESTPREFIX}pbmmake" - shopt -s expand_aliases for i in `seq 1 8` do @@ -18,4 +16,3 @@ do pbmmake -b $i $i ; pbmmake -g $i $i ) | cksum done - diff --git a/test/pbmminkowski.test b/test/pbmminkowski.test index 120441f1..389ff44a 100755 --- a/test/pbmminkowski.test +++ b/test/pbmminkowski.test @@ -2,10 +2,6 @@ # This script tests: pbmminkowski # Also requires: pbmmake pnmmargin pnmpad - alias pbmminkowski="${PBM_TESTPREFIX}pbmminkowski" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pnmmargin="${PBM_BINPREFIX}pnmmargin" - shopt -s expand_aliases pbmmake -w 1 1 | pnmmargin -b 1 | \ pbmminkowski diff --git a/test/pbmpage.test b/test/pbmpage.test index c03ee8d7..e9bfe352 100755 --- a/test/pbmpage.test +++ b/test/pbmpage.test @@ -1,9 +1,7 @@ #! /bin/bash -# This script tests: pbmpage -# Also requires: +# This script tests: pbmpage +# Also requires: - alias pbmpage="${PBM_TESTPREFIX}pbmpage" - shopt -s expand_aliases pbmpage 1 | cksum pbmpage 2 | cksum diff --git a/test/pbmpscale.test b/test/pbmpscale.test index 50ae470d..42046c74 100755 --- a/test/pbmpscale.test +++ b/test/pbmpscale.test @@ -2,12 +2,8 @@ # This script tests: pbmpscale # Also requires: pamenlarge pbmtext - alias pbmpscale="${PBM_TESTPREFIX}pbmpscale" - alias pamenlarge="${PBM_BINPREFIX}pamenlarge" - alias pbmtext="${PBM_BINPREFIX}pbmtext" - shopt -s expand_aliases -pbmtext -nomargin "F" | pbmpscale 3 -plain +pbmtext -nomargin "F" | pbmpscale 3 -plain for i in 2 3 4 do diff --git a/test/pbmtext.test b/test/pbmtext.test index 21020969..dffb2cb4 100755 --- a/test/pbmtext.test +++ b/test/pbmtext.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pbmtext -# Also requires: +# Also requires: - alias pbmtext="${PBM_TESTPREFIX}pbmtext" - shopt -s expand_aliases for i in 0123456789 abcdefghijk lmnopqrst uzwxyz ABCDEFGHIJK LMNOPQRST UVWXYZ do diff --git a/test/pbmtog3.test b/test/pbmtog3.test index 74b901e3..15c0cdf9 100755 --- a/test/pbmtog3.test +++ b/test/pbmtog3.test @@ -2,9 +2,6 @@ # This script tests: pbmtog3 # Also requires: pbmmake - alias pbmtog3="${PBM_TESTPREFIX}pbmtog3" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - shopt -s expand_aliases # Test 1. Should print 3697098186 144 pbmtog3 testgrid.pbm | cksum diff --git a/test/pbmupc.test b/test/pbmupc.test index 39e4c10c..275117d5 100755 --- a/test/pbmupc.test +++ b/test/pbmupc.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pbmupc -# Also requires: +# Also requires: - alias pbmupc="${PBM_TESTPREFIX}pbmupc" - shopt -s expand_aliases for type in -s1 -s2 do diff --git a/test/pcx-roundtrip.test b/test/pcx-roundtrip.test index 5efbbca9..3dba42b9 100755 --- a/test/pcx-roundtrip.test +++ b/test/pcx-roundtrip.test @@ -1,10 +1,7 @@ +#! /bin/bash # This script tests: ppmtopcx pcxtoppm # Also requires: pnmremap - alias ppmtopcx="${PBM_TESTPREFIX}ppmtopcx" - alias pcxtoppm="${PBM_TESTPREFIX}pcxtoppm" - alias ppmremap="${PBM_BINPREFIX}ppmremap" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} pcxstd_ppm=${tmpdir}/pcxstd_ppm @@ -46,4 +43,3 @@ rm ${testpcx_ppm} ${pcxstd_ppm} # result of: # pgmtoppm < testgrid.pbm | cksum ppmtopcx -stdpalette -packed testgrid.pbm | pcxtoppm | cksum - diff --git a/test/pfm-roundtrip.test b/test/pfm-roundtrip.test index 650cc4d0..f1b5d418 100755 --- a/test/pfm-roundtrip.test +++ b/test/pfm-roundtrip.test @@ -2,10 +2,6 @@ # This script tests: pamtopfm pfmtopam # Also requires: pamtopnm - alias pamtopfm="${PBM_TESTPREFIX}pamtopfm" - alias pfmtopam="${PBM_TESTPREFIX}pfmtopam" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - shopt -s expand_aliases # Should print 1926073387 101484, cksum of testimg.ppm pamtopfm testimg.ppm | pfmtopam | \ diff --git a/test/pgmbentley.test b/test/pgmbentley.test index 8af2c59c..0429d54b 100755 --- a/test/pgmbentley.test +++ b/test/pgmbentley.test @@ -2,9 +2,6 @@ # This script tests: pgmbentley # Also requires: pgmramp - alias pgmbentley="${PBM_TESTPREFIX}pgmbentley" - alias pgmramp="${PBM_BINPREFIX}pgmramp" - shopt -s expand_aliases # Test. Should produce 4127286153 16399 pgmramp -rect 128 128 | pgmbentley | cksum diff --git a/test/pgmcrater.ok b/test/pgmcrater.ok deleted file mode 100644 index aa2592c9..00000000 --- a/test/pgmcrater.ok +++ /dev/null @@ -1 +0,0 @@ -3828822912 65551 diff --git a/test/pgmcrater.test b/test/pgmcrater.test deleted file mode 100755 index ffba435f..00000000 --- a/test/pgmcrater.test +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/bash -# This script tests: pgmcrater - - alias pgmcrater="${PBM_TESTPREFIX}pgmcrater" - shopt -s expand_aliases - -# This test is sensitive to differences in floating point math. -# With GCC slight results start to appear with -number 75 in -# the following test. Compiler type (GCC, Clang, etc.), -# SSE math (by default off with x86 32 bit on with x86 64 bit) -# and --ffast-math are factors. - -# We hope that by keeping the number of craters small the -# difference will not show up. -# -# The slight differences in the image file are not discernable by -# the naked eye. - -testrandom -q -case $? in - 81) - # Should print: 3828822912 65551 - pgmcrater -quiet -number 25 -randomseed 1 | cksum - ;; - - 8[02-9] | 90) - echo "Skipping: random number generator is not glibc." 1>&2 - exit 80;; - - *) exit 1;; # testrandom failed -esac diff --git a/test/pgmhist.test b/test/pgmhist.test index 32b18189..42666fbf 100755 --- a/test/pgmhist.test +++ b/test/pgmhist.test @@ -2,9 +2,6 @@ # This script tests: pgmhist # Also requires: pgmramp - alias pgmhist="${PBM_TESTPREFIX}pgmhist" - alias pgmramp="${PBM_BINPREFIX}pgmramp" - shopt -s expand_aliases # Ignore differences in spaces. diff --git a/test/pgmmake.test b/test/pgmmake.test index 2c384e1b..4a3c4842 100755 --- a/test/pgmmake.test +++ b/test/pgmmake.test @@ -1,13 +1,7 @@ #! /bin/bash # This script tests: pgmmake -# Also requires: +# Also requires: - alias pgmmake="${PBM_TESTPREFIX}pgmmake" - shopt -s expand_aliases pgmmake 1 50 50 | cksum -pgmmake .2 50 100 -maxval=5 | cksum - - - - +pgmmake .2 50 100 -maxval=5 | cksum diff --git a/test/pgmnoise.test b/test/pgmnoise.test index a5c1c380..0b38553b 100755 --- a/test/pgmnoise.test +++ b/test/pgmnoise.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pgmnoise -# Also requires: +# Also requires: - alias pgmnoise="${PBM_TESTPREFIX}pgmnoise" - shopt -s expand_aliases # We first check whether random number generator is glibc rand(). # If not, this test is skipped. diff --git a/test/pgmramp.test b/test/pgmramp.test index 231b9311..f6f770fe 100755 --- a/test/pgmramp.test +++ b/test/pgmramp.test @@ -1,11 +1,9 @@ #! /bin/bash # This script tests: pgmramp -# Also requires: +# Also requires: - alias pgmramp="${PBM_TESTPREFIX}pgmramp" - shopt -s expand_aliases -for type in -lr -tb -rectangle -ellipse -diagonal +for type in -lr -tb -rectangle -ellipse -diagonal do pgmramp -maxval=6 $type 4 4 -plain done @@ -15,4 +13,3 @@ do pgmramp $type 256 256 | cksum done pgmramp -diagonal -maxval=510 256 256 | cksum - \ No newline at end of file diff --git a/test/pgmtopgm.test b/test/pgmtopgm.test index 388cca93..e919fdac 100755 --- a/test/pgmtopgm.test +++ b/test/pgmtopgm.test @@ -1,8 +1,6 @@ #! /bin/bash # This script tests: pgmtopgm -# Also requires: +# Also requires: - alias pgmtopgm="${PBM_TESTPREFIX}pgmtopgm" - shopt -s expand_aliases pgmtopgm < testgrid.pbm | cksum diff --git a/test/pgmtoppm.test b/test/pgmtoppm.test index f2d0fffb..70df0d97 100755 --- a/test/pgmtoppm.test +++ b/test/pgmtoppm.test @@ -2,11 +2,6 @@ # This script tests: pgmtoppm # Also requires: pamseq pamtopnm pgmramp - alias pgmtoppm="${PBM_TESTPREFIX}pgmtoppm" - alias pamseq="${PBM_BINPREFIX}pamseq" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - alias pgmramp="${PBM_BINPREFIX}pgmramp" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} @@ -25,5 +20,3 @@ pgmtoppm yellow-blue ${test_pgm} | cksum pgmtoppm -map=${palette} ${test_pgm} | cksum rm ${test_pgm} ${palette} - - diff --git a/test/pi3-roundtrip.test b/test/pi3-roundtrip.test index cd4232eb..5700337d 100755 --- a/test/pi3-roundtrip.test +++ b/test/pi3-roundtrip.test @@ -1,11 +1,7 @@ +#! /bin/bash # This script tests: pbmtopi3 pi3topbm # Also requires: pbmmake pamcut - alias pbmtopi3="${PBM_TESTPREFIX}pbmtopi3" - alias pi3topbm="${PBM_TESTPREFIX}pi3topbm" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pamcut="${PBM_BINPREFIX}pamcut" - shopt -s expand_aliases # The pi3 image format specifies a fixed image size of 640x400. # Pbmtopi3 rejects images that do not conform. @@ -14,9 +10,7 @@ # Should print: 3139449799 32011 pbmmake -g 640 400 | pbmtopi3 | pi3topbm | cksum -# Test 2. +# Test 2. # Should print: 2425386270 41 pamcut -pad 0 0 640 400 testgrid.pbm | \ pbmtopi3 | pi3topbm | pamcut 0 0 14 16 | cksum - - diff --git a/test/pict-roundtrip.test b/test/pict-roundtrip.test index 457cb4b8..cd207d48 100755 --- a/test/pict-roundtrip.test +++ b/test/pict-roundtrip.test @@ -2,13 +2,6 @@ # This script tests: picttoppm ppmtopict # Also requires: pamseq pamdepth pamtopnm pnmremap - alias picttoppm="${PBM_TESTPREFIX}picttoppm" - alias ppmtopict="${PBM_TESTPREFIX}ppmtopict" - alias pamseq="${PBM_BINPREFIX}pamseq" - alias pamdepth="${PBM_BINPREFIX}pamdepth" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - alias pnmremap="${PBM_BINPREFIX}pnmremap" - shopt -s expand_aliases #Test. Should print 984199586 101484 pamseq 3 5 -tupletype=RGB | pamdepth 255 | pamtopnm | \ diff --git a/test/png-roundtrip.test b/test/png-roundtrip.test index dc05420a..e70f6765 100755 --- a/test/png-roundtrip.test +++ b/test/png-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash -# This script tests: pngtopnm pnmtopng -# Also requires: +# This script tests: pngtopam pnmtopng +# Also requires: - alias pngtopnm="${PBM_TESTPREFIX}pngtopnm" - alias pnmtopng="${PBM_TESTPREFIX}pnmtopng" - shopt -s expand_aliases # Test 1. Should print 1926073387 101484 18 times for flags in "" -interlace \ @@ -25,7 +22,7 @@ for flags in "" -interlace \ -comp_strategy=filtered \ -force do -pnmtopng testimg.ppm $flags | pngtopnm | cksum +pnmtopng testimg.ppm $flags | pngtopam | cksum done # Test 2. Should print 2425386270 41 18 times @@ -47,5 +44,5 @@ for flags in "" -interlace \ -comp_strategy=filtered \ -force do - pnmtopng testgrid.pbm $flags | pngtopnm | cksum + pnmtopng testgrid.pbm $flags | pngtopam | cksum done diff --git a/test/pnm-pam-roundtrip.test b/test/pnm-pam-roundtrip.test index 506d25aa..b8e60c88 100755 --- a/test/pnm-pam-roundtrip.test +++ b/test/pnm-pam-roundtrip.test @@ -1,11 +1,7 @@ #! /bin/bash # This script tests: pamtopam pamtopnm -# Also requires: +# Also requires: - alias pamtopam="${PBM_TESTPREFIX}pamtopam" - alias pamtopnm="${PBM_TESTPREFIX}pamtopnm" - shopt -s expand_aliases pamtopam < testimg.ppm | pamtopnm | cksum pamtopam < testgrid.pbm | pamtopnm | cksum - diff --git a/test/pnm-plain-roundtrip.test b/test/pnm-plain-roundtrip.test index 7d0293ee..3779d761 100755 --- a/test/pnm-plain-roundtrip.test +++ b/test/pnm-plain-roundtrip.test @@ -1,12 +1,9 @@ #! /bin/bash -# This script tests: pnmtopnm -# Also requires: pamtopnm +# This script tests: pamtopnm +# - alias pnmtopnm="${PBM_TESTPREFIX}pnmtopnm" - shopt -s expand_aliases - -pnmtopnm -plain testimg.ppm | \ - pnmtopnm | cksum -pnmtopnm -plain testgrid.pbm | \ - pnmtopnm | cksum +pamtopnm -plain testimg.ppm | \ + pamtopnm | cksum +pamtopnm -plain testgrid.pbm | \ + pamtopnm | cksum diff --git a/test/pnmcat.test b/test/pnmcat.test index b77c90fd..c643320d 100755 --- a/test/pnmcat.test +++ b/test/pnmcat.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pnmcat -# Also requires: +# Also requires: - alias pnmcat="${PBM_TESTPREFIX}pnmcat" - shopt -s expand_aliases pnmcat -lr testgrid.pbm testgrid.pbm | cksum pnmcat -tb testgrid.pbm testgrid.pbm | cksum diff --git a/test/pnminvert-roundtrip.test b/test/pnminvert-roundtrip.test index eb3e2b35..52d15039 100755 --- a/test/pnminvert-roundtrip.test +++ b/test/pnminvert-roundtrip.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pnminvert -# Also requires: +# Also requires: - alias pnminvert="${PBM_TESTPREFIX}pnminvert" - shopt -s expand_aliases pnminvert testimg.ppm | pnminvert | cksum pnminvert testgrid.pbm | pnminvert | cksum diff --git a/test/pnminvert.test b/test/pnminvert.test index f779d574..b80716ef 100755 --- a/test/pnminvert.test +++ b/test/pnminvert.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pnminvert -# Also requires: pbmmake +# Also requires: pbmmake pamchannel pamtopnm - alias pnminvert="${PBM_TESTPREFIX}pnminvert" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - shopt -s expand_aliases # Test 1. Should print 1240379484 41 pnminvert testgrid.pbm | cksum @@ -12,7 +9,7 @@ pnminvert testgrid.pbm | cksum # Test 2. Should print 1416115901 101484 pnminvert testimg.ppm | cksum -# Test 3. Should print +# Test 3. Should print 1174803406 33838 pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \ pnminvert | cksum diff --git a/test/pnmpsnr.test b/test/pnmpsnr.test index db1f0079..e3d3616b 100755 --- a/test/pnmpsnr.test +++ b/test/pnmpsnr.test @@ -2,9 +2,6 @@ # This script tests: pnmpsnr # Also requires: pbmmake - alias pnmpsnr="${PBM_TESTPREFIX}pnmpsnr" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} diff --git a/test/pnmremap1.test b/test/pnmremap1.test index 20bee75d..d7c5189c 100755 --- a/test/pnmremap1.test +++ b/test/pnmremap1.test @@ -1,15 +1,10 @@ #! /bin/bash # This script tests: pnmremap -# Also requires: pamdepth pamseq pamtopnm +# Also requires: pamseq pamtopnm - alias pnmremap="${PBM_TESTPREFIX}pnmremap" - alias pamdepth="${PBM_BINPREFIX}pamdepth" - alias pamseq="${PBM_BINPREFIX}pamseq" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} -palette=${tmpdir}/palette +palette=${tmpdir}/palette #palette255=${tmpdir}/palette255 pamseq 3 5 -tupletype=RGB | pamtopnm > ${palette} @@ -19,7 +14,7 @@ pamseq 3 5 -tupletype=RGB | pamtopnm > ${palette} # This fails with older versions of Netpbm and x86-64. # May also fail on other non-Intel architectures. # v. 10.59.2 -# x86-32: 2667816854 101482 +# x86-32: 2667816854 101482 # x86-64: 3602410851 101482 pnmremap -mapfile=${palette} -floyd -norandom \ diff --git a/test/pnmremap2.test b/test/pnmremap2.test index e5444fda..76c2d566 100755 --- a/test/pnmremap2.test +++ b/test/pnmremap2.test @@ -2,14 +2,9 @@ # This script tests: pnmremap # Also requires: pamdepth pamseq pamtopnm - alias pnmremap="${PBM_TESTPREFIX}pnmremap" - alias pamdepth="${PBM_BINPREFIX}pamdepth" - alias pamseq="${PBM_BINPREFIX}pamseq" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} -palette=${tmpdir}/palette +palette=${tmpdir}/palette palette255=${tmpdir}/palette255 pamseq 3 5 -tupletype=RGB | pamtopnm > ${palette} diff --git a/test/pnmshear.test b/test/pnmshear.test index 30ab45be..a19a9852 100755 --- a/test/pnmshear.test +++ b/test/pnmshear.test @@ -2,10 +2,6 @@ # This script tests: pnmshear # Also requires: pbmmake pnmpad - alias pnmshear="${PBM_TESTPREFIX}pnmshear" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pnmpad="${PBM_BINPREFIX}pnmpad" - shopt -s expand_aliases # Test. Should produce 598644601 24 diff --git a/test/pnmtile.test b/test/pnmtile.test index 40d9cfc2..409c0e50 100755 --- a/test/pnmtile.test +++ b/test/pnmtile.test @@ -2,9 +2,6 @@ # This script tests: pnmtile # Also requires: pnmcat - alias pnmtile="${PBM_TESTPREFIX}pnmtile" - alias pnmcat="${PBM_BINPREFIX}pnmcat" - shopt -s expand_aliases # Test 1. Should print 4228632379 259 pnmtile 40 50 testgrid.pbm | cksum diff --git a/test/pnmtopnm-plain.test b/test/pnmtopnm-plain.test index f4e0749e..5b7e4b48 100755 --- a/test/pnmtopnm-plain.test +++ b/test/pnmtopnm-plain.test @@ -1,15 +1,10 @@ #! /bin/bash -# This script tests: pnmtopnm -# Also requires: pgmtopgm ppmtoppm pamtopnm +# This script tests: pamtopnm +# Also requires: pgmtopgm ppmtoppm - alias pnmtopnm="${PBM_TESTPREFIX}pnmtopnm" - alias pgmtopgm="${PBM_BINPREFIX}pgmtopgm" - alias ppmtoppm="${PBM_BINPREFIX}ppmtoppm" - shopt -s expand_aliases +pamtopnm -plain testgrid.pbm -pnmtopnm -plain testgrid.pbm +pgmtopgm < testgrid.pbm | pamtopnm -plain -pgmtopgm < testgrid.pbm | pnmtopnm -plain - -ppmtoppm < testgrid.pbm | pnmtopnm -plain | \ +ppmtoppm < testgrid.pbm | pamtopnm -plain | \ head -n11 diff --git a/test/ppmbrighten.test b/test/ppmbrighten.test index 29cfeb2c..fa7702d8 100755 --- a/test/ppmbrighten.test +++ b/test/ppmbrighten.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: ppmbrighten -# Also requires: +# Also requires: - alias ppmbrighten="${PBM_TESTPREFIX}ppmbrighten" - shopt -s expand_aliases ppmbrighten -v 100 testimg.ppm | cksum ppmbrighten -v 100 -normalize testimg.ppm | cksum diff --git a/test/ppmchange-roundtrip.test b/test/ppmchange-roundtrip.test index 071c0b93..78f5b548 100755 --- a/test/ppmchange-roundtrip.test +++ b/test/ppmchange-roundtrip.test @@ -2,11 +2,6 @@ # This script tests: ppmchange # Also requires: pgmtopbm pnminvert ppmtopgm - alias ppmchange="${PBM_TESTPREFIX}ppmchange" - alias pgmtopbm="${PBM_BINPREFIX}pgmtopbm" - alias pnminvert="${PBM_BINPREFIX}pnminvert" - alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm" - shopt -s expand_aliases ppmchange black white white black testgrid.pbm | \ pnminvert | ppmtopgm | \ diff --git a/test/ppmchange.test b/test/ppmchange.test index 9805be0a..d29a699f 100755 --- a/test/ppmchange.test +++ b/test/ppmchange.test @@ -2,10 +2,6 @@ # This script tests: ppmchange # Also requires: ppmrainbow pgmramp - alias ppmchange="${PBM_TESTPREFIX}ppmchange" - alias ppmrainbow="${PBM_BINPREFIX}ppmrainbow" - alias pgmramp="${PBM_BINPREFIX}pgmramp" - shopt -s expand_aliases # Failure message ## If this test fails and ppmchange-roundtrip.test succeeds, @@ -57,7 +53,7 @@ rm ${rainbow_ppm} # -remainder=black -closeness=25 ${rainbow_ppm} | \ # pphist -sort=rgb -noheader # -# 0 0 0 0 75 -# 0 0 255 29 42 -# 0 50 2 30 42 -# 100 0 1 30 41 +# 0 0 0 0 75 +# 0 0 255 29 42 +# 0 50 2 30 42 +# 100 0 1 30 41 diff --git a/test/ppmcie.test b/test/ppmcie.test index 973787ec..0ce69dea 100755 --- a/test/ppmcie.test +++ b/test/ppmcie.test @@ -2,10 +2,6 @@ # This script tests: ppmcie # Also requires: pamsumm pamsharpness - alias ppmcie="${PBM_TESTPREFIX}ppmcie" - alias pamsharpness="${PBM_BINPREFIX}pamsharpness" - alias pamsumm="${PBM_BINPREFIX}pamsumm" - shopt -s expand_aliases # Failure message ## Ppmcie is sensitive to system factors. If this test fails, please @@ -17,8 +13,8 @@ tmpdir=${tmpdir:-/tmp} # Without -nolabel -noaxes -nowpoint -noblack older versions of # Netpbm produce slightly different charts. # Output from "ppmcie | cksum" : -# v. 10.35.86: 288356530 786447 -# v. 10.59.2 : 2292601420 786447 +# v. 10.35.86: 288356530 786447 +# v. 10.59.2 : 2292601420 786447 ppmcie_ppm=${tmpdir}/ppmcie.ppm diff --git a/test/ppmdfont.test b/test/ppmdfont.test index 30f74a9c..03110590 100755 --- a/test/ppmdfont.test +++ b/test/ppmdfont.test @@ -1,11 +1,7 @@ #! /bin/bash # This script tests: ppmdmkfont ppmddumpfont ppmdcfont -# Also requires: +# Also requires: - alias ppmdcfont="${PBM_TESTPREFIX}ppmdcfont" - alias ppmddumpfont="${PBM_TESTPREFIX}ppmddumpfont" - alias ppmdmkfont="${PBM_TESTPREFIX}ppmdmkfont" - shopt -s expand_aliases # Test 1. Should produce: 2726488777 48129 ppmdmkfont | ppmddumpfont 2>&1 | cksum diff --git a/test/ppmdim.test b/test/ppmdim.test index cdd7df17..438d41d3 100755 --- a/test/ppmdim.test +++ b/test/ppmdim.test @@ -1,12 +1,7 @@ #! /bin/bash # This script tests: ppmdim -# Also requires: pamfunc pnmarith pamarith pamsumm +# Also requires: pamfunc pamarith pamsumm - alias ppmdim="${PBM_TESTPREFIX}ppmdim" - alias pamfunc="${PBM_BINPREFIX}pamfunc" - alias pamsumm="${PBM_BINPREFIX}pamsumm" - alias pnmarith="${PBM_BINPREFIX}pnmarith" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} @@ -22,7 +17,7 @@ for i in 0.125 0.25 0.5 0.75 0.1 0.0117 0.2 0.4 0.333 0.666 0.8 0.9 0.95 do ppmdim $i testimg.ppm > ${dim1_ppm} pamfunc -mult=$i testimg.ppm > ${dim2_ppm} - pnmarith -diff ${dim1_ppm} ${dim2_ppm} | \ + pamarith -diff ${dim1_ppm} ${dim2_ppm} | \ pamsumm -mean -brief | \ awk '{print $1<0.75 ? "ok" : "fail"}' done diff --git a/test/ppmdither.test b/test/ppmdither.test index a93a434a..7e32ef59 100755 --- a/test/ppmdither.test +++ b/test/ppmdither.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: ppmdither -# Also requires: +# Also requires: - alias ppmdither="${PBM_TESTPREFIX}ppmdither" - shopt -s expand_aliases ppmdither testimg.ppm | cksum ppmdither -red 2 -green 2 -blue 2 testimg.ppm | cksum diff --git a/test/ppmforge.test b/test/ppmforge.test index 09a66916..65280d14 100755 --- a/test/ppmforge.test +++ b/test/ppmforge.test @@ -1,8 +1,6 @@ #! /bin/bash # This script tests: ppmforge - - alias ppmforge="${PBM_TESTPREFIX}ppmforge" - shopt -s expand_aliases +# Also requires: # Use small x y values to avoid floating point issues. diff --git a/test/ppmgauss.test b/test/ppmgauss.test index 9dfdd2f6..213810c7 100755 --- a/test/ppmgauss.test +++ b/test/ppmgauss.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: pamgauss -# Also requires: +# Also requires: - alias pamgauss="${PBM_TESTPREFIX}pamgauss" - shopt -s expand_aliases for i in `seq 3 11` do diff --git a/test/ppmhist.test b/test/ppmhist.test index 6dcbc762..97fbd79d 100755 --- a/test/ppmhist.test +++ b/test/ppmhist.test @@ -2,10 +2,6 @@ # This script tests: ppmhist # Also requires: pgmramp - alias ppmhist="${PBM_TESTPREFIX}ppmhist" - alias pgmramp="${PBM_BINPREFIX}pgmramp" - shopt -s expand_aliases pgmramp -maxval=8 -lr 8 2 | ppmhist -sort=rgb ppmhist -map -sort=rgb testimg.ppm | cksum - diff --git a/test/ppmmake.test b/test/ppmmake.test index faba1ace..879a367e 100755 --- a/test/ppmmake.test +++ b/test/ppmmake.test @@ -1,14 +1,7 @@ #! /bin/bash # This script tests: ppmmake -# Also requires: +# Also requires: - alias ppmmake="${PBM_TESTPREFIX}ppmmake" - shopt -s expand_aliases ppmmake rgb:ff/80/80 50 100 -maxval=5 | cksum ppmmake red 50 50 | cksum - - - - - diff --git a/test/ppmmix.test b/test/ppmmix.test index 9a54143f..e1c6486b 100755 --- a/test/ppmmix.test +++ b/test/ppmmix.test @@ -3,15 +3,6 @@ # Also requires: pamdepth pamenlarge pamsumm pbmmake # Also requires: pgmtopgm pnminvert ppmtopgm - alias ppmmix="${PBM_TESTPREFIX}ppmmix" - alias pamdepth="${PBM_BINPREFIX}pamdepth" - alias pamenlarge="${PBM_BINPREFIX}pamenlarge" - alias pamsumm="${PBM_BINPREFIX}pamsumm" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pgmtopgm="${PBM_BINPREFIX}pgmtopgm" - alias pnminvert="${PBM_BINPREFIX}pnminvert" - alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm" - shopt -s expand_aliases tmpdir=${tmpdir:-/tmp} @@ -25,9 +16,9 @@ ppmmix 0.75 ${a1_pgm} ${a2_pgm} | ppmtopgm | pamdepth 3 -plain && rm ${a1_pgm} ${a2_pgm} # Mix image with itself. -# Output should match input regardless of ratio. +# Output should match input regardless of ratio. for i in 0 0.5 0.6 1 -do +do ppmmix $i testimg.ppm testimg.ppm | cksum done diff --git a/test/ppmpat.test b/test/ppmpat.test index bf1e9316..89f86f67 100755 --- a/test/ppmpat.test +++ b/test/ppmpat.test @@ -1,8 +1,6 @@ #! /bin/bash # This script tests: ppmpat - - alias ppmpat="${PBM_TESTPREFIX}ppmpat" - shopt -s expand_aliases +# Also requires: # TODO: Write tests for squig and poles. It appears that they are # sensitive to differences in floating point math. diff --git a/test/ppmrelief.test b/test/ppmrelief.test index 378a22c9..3467dcde 100755 --- a/test/ppmrelief.test +++ b/test/ppmrelief.test @@ -2,11 +2,6 @@ # This script tests: ppmrelief # Also requires: pbmmake pgmramp pamflip - alias ppmrelief="${PBM_TESTPREFIX}ppmrelief" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pgmramp="${PBM_BINPREFIX}pgmramp" - alias pamflip="${PBM_BINPREFIX}pamflip" - shopt -s expand_aliases # Test 1. Should print 3637356697 688 pbmmake -w 15 15 | ppmrelief | cksum @@ -39,4 +34,3 @@ pgmramp -diagonal -maxval=30 16 16 | pamflip -lr | ppmrelief | cksum # 0 14 14 14 14 14 14 14 14 14 14 14 14 14 14 0 # 0 14 14 14 14 14 14 14 14 14 14 14 14 14 14 0 # 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - diff --git a/test/ppmrough.test b/test/ppmrough.test index dbe92c29..cf948f9f 100755 --- a/test/ppmrough.test +++ b/test/ppmrough.test @@ -1,9 +1,6 @@ #! /bin/bash # This script tests: ppmrough - - alias ppmrough="${PBM_TESTPREFIX}ppmrough" - shopt -s expand_aliases - +# Also requires: testrandom -q case $? in diff --git a/test/ppmtopgm.test b/test/ppmtopgm.test index 94e0ae91..8503194b 100755 --- a/test/ppmtopgm.test +++ b/test/ppmtopgm.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: ppmtopgm -# Also requires: +# Also requires: - alias ppmtopgm="${PBM_TESTPREFIX}ppmtopgm" - shopt -s expand_aliases # Test 1. Should produce 2871603838 33838 ppmtopgm testimg.ppm | cksum - diff --git a/test/ppmtoppm.test b/test/ppmtoppm.test index 2d84809a..797c733d 100755 --- a/test/ppmtoppm.test +++ b/test/ppmtoppm.test @@ -1,8 +1,6 @@ #! /bin/bash # This script tests: ppmtoppm -# Also requires: +# Also requires: - alias ppmtoppm="${PBM_TESTPREFIX}ppmtoppm" - shopt -s expand_aliases ppmtoppm < testgrid.pbm | cksum diff --git a/test/ppmwheel.test b/test/ppmwheel.test index 89bab029..f528e209 100755 --- a/test/ppmwheel.test +++ b/test/ppmwheel.test @@ -1,9 +1,7 @@ #! /bin/bash # This script tests: ppmwheel -# Also requires: +# Also requires: - alias ppmwheel="${PBM_TESTPREFIX}ppmwheel" - shopt -s expand_aliases # For values 6 and above, x86(-32) and x86-64 produce different output. # SSE floating-point math is the probable cause. @@ -110,7 +108,3 @@ done # 98: 4086203619 28825 1961862620 28825 # 99: 3656777902 29416 2475351252 29416 # 100: 2246720411 30015 4055518595 30015 - - - - diff --git a/test/ps-alt-roundtrip.test b/test/ps-alt-roundtrip.test index d61e55d9..d90c4ddb 100755 --- a/test/ps-alt-roundtrip.test +++ b/test/ps-alt-roundtrip.test @@ -1,14 +1,7 @@ #! /bin/bash # This script tests: pbmtoepsi pbmtopsg3 pbmtolps psidtopgm pstopnm -# Also requires: gs pnmtopnm pnmcrop +# Also requires: gs pnmcrop - alias pbmtoepsi="${PBM_TESTPREFIX}pbmtoepsi" - alias pbmtolps="${PBM_TESTPREFIX}pbmtolps" - alias pbmtopsg3="${PBM_TESTPREFIX}pbmtopsg3" - alias psidtopgm="${PBM_TESTPREFIX}psidtopgm" - alias pstopnm="${PBM_TESTPREFIX}pstopnm" - alias pnmcrop="${PBM_BINPREFIX}pnmcrop" - shopt -s expand_aliases # This script is for testing alternative (or minor) utilities that # read/write Postscript and encapsulated Postscript: @@ -25,8 +18,8 @@ ## pbmtoepsi, pbmtopsg3, pbmtolps or psidtopgm. ## If both tests fail it indicates a problem with pstopnm or gs. -# pstopnm does not use libnetpbm functions for output. -# Output is filtered through pnmtopnm. +# pstopnm does not use libnetpbm functions for output. +# Output is filtered through at least one Netpbm program. # Test 1. Should print: 2425386270 41 testgrid1_ps=${tmpdir}/testgrid1.ps @@ -54,7 +47,7 @@ rm ${testgrid2_ps} # Test 3. Should print: 2916080186 235 # Output is pgm maxval=1 with black and white inverted. # -testgrid_epsi=${tmpdir}/testgrid.epsi +testgrid_epsi=${tmpdir}/testgrid.epsi pbmtoepsi testgrid.pbm > ${testgrid_epsi} && \ xysizebps=`awk '/BeginPreview/ {print $2,$3,$4}' \ @@ -64,4 +57,4 @@ awk '/^%%BeginPreview:/ { p=1; next } /^%%EndImage/ { p=0; next } \ p==1 {print "!"$0}' \ ${testgrid_epsi} | psidtopgm $xysizebps | cksum -rm ${testgrid_epsi} +rm ${testgrid_epsi} diff --git a/test/ps-roundtrip.test b/test/ps-roundtrip.test index 4773d4a6..873bbdef 100755 --- a/test/ps-roundtrip.test +++ b/test/ps-roundtrip.test @@ -1,15 +1,7 @@ #! /bin/bash # This script tests: pnmtops pstopnm -# Also requires: pnmtopnm pamtopnm gs pbmmake pnmshear pnmpad pnmcat +# Also requires: pamtopnm gs pbmmake pnmshear pnmpad pnmcat - alias pnmtops="${PBM_TESTPREFIX}pnmtops" - alias pstopnm="${PBM_TESTPREFIX}pstopnm" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - alias pnmcat="${PBM_BINPREFIX}pnmcat" - alias pnmpad="${PBM_BINPREFIX}pnmpad" - alias pnmshear="${PBM_BINPREFIX}pnmshear" - alias pnmtopnm="${PBM_BINPREFIX}pnmtopnm" - shopt -s expand_aliases # Failure message ## This test fails when: @@ -18,8 +10,8 @@ tmpdir=${tmpdir:-/tmp} -# pstopnm does not use libnetpbm functions for output. -# Output is filtered through pnmtopnm. +# pstopnm does not use libnetpbm functions for output. +# Output is filtered through pamtopnm. # Test 1. Should print: 1926073387 101484 five times # *NOTE* Fifth iteration fails if pnmtops was compiled without zlib @@ -33,7 +25,7 @@ for flag in "" "-ps" "-rle" "-ps -ascii" "-ps -flate" xysize1=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5}' \ ${test1_ps}` && \ pstopnm -portrait -xborder=0 -yborder=0 $xysize1 -stdout -quiet \ - ${test1_ps} | pnmtopnm | cksum + ${test1_ps} | pamtopnm | cksum done rm ${test1_ps} @@ -52,14 +44,14 @@ pbmmake -g 8 4 | \ pnmcat -tb -jright - ${g_pbm} > ${t_pbm} && for flag in "" "-rle" "-ps -rle -ascii" \ "-bitspersample=2 -rle" "-ps -bitspersample=4 -rle" \ - "-bitspersample=8 -rle" "-ps -bitspersample=12 -rle -dict" + "-bitspersample=8 -rle" "-ps -bitspersample=12 -rle -dict" do pnmtops -nocenter -equalpixels -dpi 72 -noturn ${flag} ${t_pbm} \ > ${grid_ps} && \ xysize2=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5}' \ ${grid_ps}` && \ pstopnm -portrait -xborder=0 -yborder=0 $xysize2 -stdout \ - -quiet ${grid_ps} -pbm | pnmtopnm | cksum + -quiet ${grid_ps} -pbm | pamtopnm | cksum done rm ${grid_ps} ${g_pbm} ${t_pbm} @@ -74,7 +66,7 @@ rm ${grid_ps} ${g_pbm} ${t_pbm} # (2) awk: xy values are taken from the first "BoundingBox" encountered. # Subsequent BoundingBox values are ignored. # (3) pstopnm: input must be an ordinary file. Input from stdin -# (by pipe or input redirection: "< file" ) does not work. +# (by pipe or input redirection: "< file" ) does not work. # test3_ps=${tmpdir}/testimg3.ps @@ -88,7 +80,7 @@ pnmtops -nocenter -equalpixels -dpi 72 -noturn -setpage ${flag} \ xysize3=`awk '/BoundingBox/ {print "-xsize="$4,"-ysize="$5 ; exit}' \ ${test3_ps}` && pstopnm -portrait -xborder=0 -yborder=0 $xysize3 -stdout ${test3_ps} | \ - pnmtopnm | cksum + pamtopnm | cksum done rm ${test3_ps} diff --git a/test/rgb3-roundtrip.test b/test/rgb3-roundtrip.test index 091fe46b..cac52220 100755 --- a/test/rgb3-roundtrip.test +++ b/test/rgb3-roundtrip.test @@ -2,12 +2,6 @@ # This script tests: ppmtorgb3 rgb3toppm # Also requires: pgmtopbm pgmtopgm ppmtopgm - alias ppmtorgb3="${PBM_TESTPREFIX}ppmtorgb3" - alias rgb3toppm="${PBM_TESTPREFIX}rgb3toppm" - alias pgmtopbm="${PBM_BINPREFIX}pgmtopbm" - alias pgmtopgm="${PBM_BINPREFIX}pgmtopgm" - alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm" - shopt -s expand_aliases # Break an image into three monochrome planes, reassemble the # image from them and check whether the resulting output is diff --git a/test/sbig-roundtrip.test b/test/sbig-roundtrip.test index 7a339470..1fdaccfd 100755 --- a/test/sbig-roundtrip.test +++ b/test/sbig-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pgmtosbig sbigtopgm -# Also requires: pamchannel +# Also requires: pamchannel pamtopnm - alias sbigtopgm="${PBM_TESTPREFIX}sbigtopgm" - alias pgmtosbig="${PBM_TESTPREFIX}pgmtosbig" - shopt -s expand_aliases # Should produce 1571496937 33838, cksum of testimg.red diff --git a/test/sgi-roundtrip.test b/test/sgi-roundtrip.test index 99b5735e..5012aab7 100755 --- a/test/sgi-roundtrip.test +++ b/test/sgi-roundtrip.test @@ -2,10 +2,6 @@ # This script tests: pnmtosgi sgitopnm # Also requires: rgb3toppm - alias pnmtosgi="${PBM_TESTPREFIX}pnmtosgi" - alias sgitopnm="${PBM_TESTPREFIX}sgitopnm" - alias rgb3toppm="${PBM_BINPREFIX}rgb3toppm" - shopt -s expand_aliases a_sgi=${tmpdir}/a.sgi a_red=${tmpdir}/a.red diff --git a/test/st4-roundtrip.test b/test/st4-roundtrip.test index bd3da5f1..ffe8f348 100755 --- a/test/st4-roundtrip.test +++ b/test/st4-roundtrip.test @@ -2,9 +2,6 @@ # This script tests: pgmtost4 st4topgm # Also requires: pamchannel pamtopnm pamcut - alias st4topgm="${PBM_TESTPREFIX}st4topgm" - alias pgmtost4="${PBM_TESTPREFIX}pgmtost4" - shopt -s expand_aliases # Input image of pgmtost4 must by 192x165 diff --git a/test/sunrast-roundtrip.test b/test/sunrast-roundtrip.test index 78e4ae15..a5cfa8c7 100755 --- a/test/sunrast-roundtrip.test +++ b/test/sunrast-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pnmtorast rasttopnm -# Also requires: +# Also requires: - alias pnmtorast="${PBM_TESTPREFIX}pnmtorast" - alias rasttopnm="${PBM_TESTPREFIX}rasttopnm" - shopt -s expand_aliases # Should produce 1926073387 101484, cksum of testimg.ppm -pnmtorast testimg.ppm | rasttopnm | cksum +pnmtorast testimg.ppm | rasttopnm | cksum diff --git a/test/symmetry.test b/test/symmetry.test index 596b67b2..e6a6b654 100755 --- a/test/symmetry.test +++ b/test/symmetry.test @@ -2,13 +2,6 @@ # This script tests: pgmramp pamgauss pgmkernel pbmmake pbmpscale # Also requires: pamflip - alias pgmramp="${PBM_TESTPREFIX}pgmramp" - alias pamgauss="${PBM_TESTPREFIX}pamgauss" - alias pgmkernel="${PBM_TESTPREFIX}pgmkernel" - alias pbmmake="${PBM_TESTPREFIX}pbmmake" - alias pbmpscale="${PBM_TESTPREFIX}pbmpscale" - alias pamflip="${PBM_BINPREFIX}pamflip" - shopt -s expand_aliases # All tests print "ok" upon success, cksum results otherwise. # The "$3>0" is a kludge for preventing false positives with empty files. @@ -102,4 +95,3 @@ pgmramp -ell 101 33 > ${ell_pgm} awk '$1==3 && $3>0 { print "ok"; exit }; { print }' rm ${ell_pgm} - diff --git a/test/targa-roundtrip.test b/test/targa-roundtrip.test index 66e666c6..f646b8c1 100755 --- a/test/targa-roundtrip.test +++ b/test/targa-roundtrip.test @@ -1,11 +1,7 @@ #! /bin/bash # This script tests: pamtotga tgatoppm -# Also requires: pgmtopbm +# Also requires: ppmtopgm pgmtopbm pamchannel - alias pamtotga="${PBM_TESTPREFIX}pamtotga" - alias tgatoppm="${PBM_TESTPREFIX}tgatoppm" - alias pgmtopbm="${PBM_BINPREFIX}pgmtopbm" - shopt -s expand_aliases #Test 1: Should print 2425386270 41, cksum of testgrid.pbm diff --git a/test/testrandom.c b/test/testrandom.c index 3f65f0d2..43414926 100644 --- a/test/testrandom.c +++ b/test/testrandom.c @@ -9,6 +9,9 @@ Options: -q : quiet mode -v : verbose mode : Use to generate values for new table + + This is a self-contained program which does not require any libnetpbm + functions. =============================================================================*/ #include #include diff --git a/test/tiff-roundtrip.test b/test/tiff-roundtrip.test index 410148a5..a99425fa 100755 --- a/test/tiff-roundtrip.test +++ b/test/tiff-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pamtotiff tifftopnm -# Also requires: +# Also requires: - alias pamtotiff="${PBM_TESTPREFIX}pamtotiff" - alias tifftopnm="${PBM_TESTPREFIX}tifftopnm" - shopt -s expand_aliases # Failure message ## Second test fails if Netpbm was built without the flate library @@ -12,14 +9,14 @@ pamtotiff testimg.ppm 1<>${tmpdir}/test1.tiff && tifftopnm ${tmpdir}/test1.tiff | cksum -# test flate compression +# test flate compression pamtotiff -flate testimg.ppm 1<>${tmpdir}/test2.tiff && tifftopnm ${tmpdir}/test2.tiff | cksum pamtotiff testgrid.pbm 1<>${tmpdir}/test3.tiff && tifftopnm ${tmpdir}/test3.tiff | cksum -# test G4 compression +# test G4 compression pamtotiff -g4 testgrid.pbm 1<>${tmpdir}/test4.tiff && tifftopnm ${tmpdir}/test4.tiff | cksum diff --git a/test/utahrle-roundtrip.test b/test/utahrle-roundtrip.test index dd88265c..982b72a9 100755 --- a/test/utahrle-roundtrip.test +++ b/test/utahrle-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pnmtorle rletopnm -# Also requires: +# Also requires: pamchannel pamtopnm - alias pnmtorle="${PBM_TESTPREFIX}pnmtorle" - alias rletopnm="${PBM_TESTPREFIX}rletopnm" - shopt -s expand_aliases #Test 1. Should produce 1571496937 33838, cksum of testimg.red pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \ diff --git a/test/wbmp-roundtrip.test b/test/wbmp-roundtrip.test index 40988635..b651c3d0 100755 --- a/test/wbmp-roundtrip.test +++ b/test/wbmp-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pbmtowbmp wbmptopbm -# Also requires: +# Also requires: - alias pbmtowbmp="${PBM_TESTPREFIX}pbmtowbmp" - alias wbmptopbm="${PBM_TESTPREFIX}wbmptopbm" - shopt -s expand_aliases # Should print 2425386270 41, cksum of testgrid.pbm pbmtowbmp testgrid.pbm | wbmptopbm | cksum diff --git a/test/winicon-roundtrip.test b/test/winicon-roundtrip.test index 20b0a225..b37a33e1 100755 --- a/test/winicon-roundtrip.test +++ b/test/winicon-roundtrip.test @@ -1,17 +1,9 @@ #! /bin/bash # This script tests: pamtowinicon winicontopam -# Also requires: pnmcut pnmtile pamtopnm ppmtopgm pgmtopbm +# Also requires: pamcut pnmtile pamtopnm ppmtopgm pgmtopbm - alias pamtowinicon="${PBM_TESTPREFIX}pamtowinicon" - alias winicontopam="${PBM_TESTPREFIX}winicontopam" - alias pamtopnm="${PBM_BINPREFIX}pamtopnm" - alias pgmtopbm="${PBM_BINPREFIX}pgmtopbm" - alias pnmcut="${PBM_BINPREFIX}pnmcut" - alias pnmtile="${PBM_BINPREFIX}pnmtile" - alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm" - shopt -s expand_aliases -pnmcut --left=30 --width=48 --height=48 testimg.ppm | \ +pamcut --left=30 --width=48 --height=48 testimg.ppm | \ pamtowinicon | winicontopam | \ pamtopnm | cksum @@ -19,4 +11,3 @@ pnmtile 32 32 testgrid.pbm | \ pamtowinicon | winicontopam | \ pamtopnm | ppmtopgm | \ pgmtopbm -th -val=0.5 | cksum - diff --git a/test/xbm-roundtrip.test b/test/xbm-roundtrip.test index 4823adfd..e84d6fc3 100755 --- a/test/xbm-roundtrip.test +++ b/test/xbm-roundtrip.test @@ -1,10 +1,7 @@ #! /bin/bash # This script tests: pbmtoxbm xbmtopbm -# Also requires: +# Also requires: - alias pbmtoxbm="${PBM_TESTPREFIX}pbmtoxbm" - alias xbmtopbm="${PBM_TESTPREFIX}xbmtopbm" - shopt -s expand_aliases pbmtoxbm testgrid.pbm | xbmtopbm | cksum pbmtoxbm -x10 testgrid.pbm | xbmtopbm | cksum diff --git a/test/xpm-roundtrip.test b/test/xpm-roundtrip.test index c3c9894d..fd0253b1 100755 --- a/test/xpm-roundtrip.test +++ b/test/xpm-roundtrip.test @@ -2,11 +2,6 @@ # This script tests: ppmtoxpm xpmtoppm # Also requires: pgmtopbm ppmtopgm - alias ppmtoxpm="${PBM_TESTPREFIX}ppmtoxpm" - alias xpmtoppm="${PBM_TESTPREFIX}xpmtoppm" - alias pgmtopbm="${PBM_BINPREFIX}pgmtopbm" - alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm" - shopt -s expand_aliases #ppmtoxpm -hexonly testimg.ppm | \ # xpmtoppm | cksum diff --git a/test/xwd-roundtrip.test b/test/xwd-roundtrip.test index 4dbd3020..cd0d38ad 100755 --- a/test/xwd-roundtrip.test +++ b/test/xwd-roundtrip.test @@ -1,11 +1,7 @@ #! /bin/bash # This script tests: pnmtoxwd xwdtopnm -# Also requires: pamdepth +# Also requires: pamchannel pamtopnm pamdepth - alias pnmtoxwd="${PBM_TESTPREFIX}pnmtoxwd" - alias xwdtopnm="${PBM_TESTPREFIX}xwdtopnm" - alias pamdepth="${PBM_BINPREFIX}pamdepth" - shopt -s expand_aliases # Test 1. Should produce 1571496937 33838, cksum of testimg.red pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | \ diff --git a/test/yuv-roundtrip.test b/test/yuv-roundtrip.test index 8e0d4f1a..e339b418 100755 --- a/test/yuv-roundtrip.test +++ b/test/yuv-roundtrip.test @@ -2,10 +2,6 @@ # This script tests: ppmtoyuv yuvtoppm # Also requires: pamgradient - alias ppmtoyuv="${PBM_TESTPREFIX}ppmtoyuv" - alias yuvtoppm="${PBM_TESTPREFIX}yuvtoppm" - alias pamgradient="${PBM_BINPREFIX}pamgradient" - shopt -s expand_aliases # Should produce 1904478375 253455 -- cgit 1.4.1