diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-04-24 22:56:51 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2016-04-24 22:56:51 +0000 |
commit | 30e4e36d7e8d0371d18c8da632bd26658859fbb4 (patch) | |
tree | 53976290d5b0b6e2821a5c5d2f27f0c13b3fcd1c /test | |
parent | ffa0d9869fe04de4649c4101f2117473ad91fcdf (diff) | |
download | netpbm-mirror-30e4e36d7e8d0371d18c8da632bd26658859fbb4.tar.gz netpbm-mirror-30e4e36d7e8d0371d18c8da632bd26658859fbb4.tar.xz netpbm-mirror-30e4e36d7e8d0371d18c8da632bd26658859fbb4.zip |
Test updates
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2718 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rw-r--r-- | test/all-in-place.ok | 11 | ||||
-rwxr-xr-x | test/all-in-place.test | 60 | ||||
-rw-r--r-- | test/legacy-names.ok | 3 | ||||
-rwxr-xr-x | test/legacy-names.test | 15 |
4 files changed, 42 insertions, 47 deletions
diff --git a/test/all-in-place.ok b/test/all-in-place.ok index 6ba75993..29d4eb4d 100644 --- a/test/all-in-place.ok +++ b/test/all-in-place.ok @@ -11,6 +11,7 @@ cmuwmtopbm: ok ddbugtopbm: ok escp2topbm: ok eyuvtoppm: ok +fiascotopnm: ok fitstopnm: ok fstopgm: ok g3topbm: ok @@ -195,6 +196,7 @@ pnmhisteq: ok pnmhistmap: ok pnmindex: ok pnminvert: ok +pnmmargin: ok pnmmercator: ok pnmmontage: ok pnmnlfilt: ok @@ -236,6 +238,7 @@ ppmdist: ok ppmdither: ok ppmdmkfont: ok ppmdraw: ok +ppmfade: ok ppmflash: ok ppmforge: ok ppmglobe: ok @@ -245,8 +248,10 @@ ppmmake: ok ppmmix: ok ppmntsc: ok ppmpat: ok +ppmrainbow: ok ppmrelief: ok ppmrough: ok +ppmshadow: ok ppmshift: ok ppmspread: ok ppmtoacad: ok @@ -315,15 +320,9 @@ yuvsplittoppm: ok yuvtoppm: ok yuy2topam: ok zeisstopnm: ok -fiascotopnm: ok manweb: ok -pnmmargin: ok anytopnm: ok -ppmtomap: ok -ppmshadow: ok pnmquant: ok pnmquantall: ok -ppmrainbow: ok -ppmfade: ok pamstretch-gen: ok pcdovtoppm: ok diff --git a/test/all-in-place.test b/test/all-in-place.test index 4c8af56b..fc5f3afd 100755 --- a/test/all-in-place.test +++ b/test/all-in-place.test @@ -4,9 +4,12 @@ # 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. +## See Netpbm Library Prerequisites +## http://netpbm.sourceforge.net/prereq.html +## if make succeeds but this test fails +## +## If you run the "make test-install" on an older version, some executables +## may be reported as missing because of missing features. function testExitStatus () { @@ -50,6 +53,7 @@ ordinary_testprogs="\ ddbugtopbm \ escp2topbm \ eyuvtoppm \ + fiascotopnm \ fitstopnm \ fstopgm \ g3topbm \ @@ -234,6 +238,7 @@ ordinary_testprogs="\ pnmhistmap \ pnmindex \ pnminvert \ + pnmmargin \ pnmmercator \ pnmmontage \ pnmnlfilt \ @@ -275,6 +280,7 @@ ordinary_testprogs="\ ppmdither \ ppmdmkfont \ ppmdraw \ + ppmfade \ ppmflash \ ppmforge \ ppmglobe \ @@ -284,8 +290,10 @@ ordinary_testprogs="\ ppmmix \ ppmntsc \ ppmpat \ + ppmrainbow \ ppmrelief \ ppmrough \ + ppmshadow \ ppmshift \ ppmspread \ ppmtoacad \ @@ -356,32 +364,25 @@ ordinary_testprogs="\ zeisstopnm \ " +# The string "fiascotopnm" has to be filtered out by egrep for fiascotopnm +# has a slightly different version report format. + for i in $ordinary_testprogs do $i --version 2>&1 | \ - egrep -v \ + egrep -v -e fiascotopnm -e \ "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ 1>&2; testExitStatus $i 0 ${PIPESTATUS[0]} done -# Test fiascotopnm, which has a unique -v flag. -fiascotopnm -v 2> /dev/null - testExitStatus fiascotopnm 2 $? - - -# Test manweb and pnmmargin, which have --help. +# Test manweb which has --help. manweb --help > /dev/null testExitStatus manweb 0 $? -pnmmargin --help 2> /dev/null - testExitStatus pnmmargin 1 $? - -# Test anytopnm, pnmnoraw, pnmquant, pnmquantall -# ppmrainbow, ppmshadow, ppmtomap -# with trivial input. +# Test anytopnm, pnmnoraw, pnmquant, pnmquantall with trivial input. $i ${tmpdir}/test.pbm > /dev/null 2> /dev/null; tmpdir=${tmpdir:-/tmp} @@ -393,33 +394,24 @@ P1 1 EOF -for i in anytopnm ppmtomap ppmshadow - do - $i ${tmpdir}/test.pbm > /dev/null 2> /dev/null; - testExitStatus $i 0 $? - done +# Anytopnm now supports --version but it delegates the report to pamtopnm. +# It fails if pamtopnm is absent. +# We consider anytopnm too important to test in an indirect manner. + +anytopnm ${tmpdir}/test.pbm > /dev/null 2> /dev/null; +testExitStatus anytopnm 0 $? +# Likewise pnmquant and pnmquantall support --version but we test them +# by running them with actual input. for i in pnmquant pnmquantall do $i 2 ${tmpdir}/test.pbm > /dev/null 2> /dev/null; testExitStatus $i 0 $? done -rm ${test_pbm} - 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. - 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. +# These two programs write a usage message on stdout when there is no input. # Exit status should be 1. for i in pamstretch-gen pcdovtoppm diff --git a/test/legacy-names.ok b/test/legacy-names.ok index 9676639b..d47c7754 100644 --- a/test/legacy-names.ok +++ b/test/legacy-names.ok @@ -4,6 +4,7 @@ icontopbm: ok pamfixtrunc: ok pamrgbatopng: ok pbmtoicon: ok +pgmcrater: ok pgmedge: ok pgmnorm: ok pgmoil: ok @@ -25,10 +26,10 @@ pnmtotiff: ok ppmnorm: ok ppmtogif: ok ppmtojpeg: ok +ppmtomap: ok ppmtompeg: ok ppmtotga: ok ppmtouil: ok -pgmcrater: ok pbmtox10bm: ok pnmnoraw: ok pnmtoplainpnm: ok diff --git a/test/legacy-names.test b/test/legacy-names.test index df40e62d..406f1d4c 100755 --- a/test/legacy-names.test +++ b/test/legacy-names.test @@ -10,6 +10,12 @@ ## ## Important: This test checks obsoleted names. ## Programs here do not appear in other tests. +## +## Programs here are wrapper scripts provided for backward compatibility. +## The newer replacement program may be the cause of any failure reported. +## +## If you run the "make test-install" on an older version, some executables +## may be reported as missing because of missing features. # Skip this test if CHECK_TYPE = tree @@ -55,6 +61,7 @@ ordinary_testprogs="\ pamfixtrunc \ pamrgbatopng \ pbmtoicon \ + pgmcrater \ pgmedge \ pgmnorm \ pgmoil \ @@ -76,6 +83,7 @@ ordinary_testprogs="\ ppmnorm \ ppmtogif \ ppmtojpeg \ + ppmtomap \ ppmtompeg \ ppmtotga \ ppmtouil \ @@ -91,13 +99,8 @@ for i in $ordinary_testprogs done -# Test pgmcrater - -pgmcrater -number 1 -xsize 15 -ysize 15 -randomseed 1 > /dev/null -testExitStatus pgmcrater 0 $? - -# Test pbmtox10bm, pnmnoraw, pnmtoplainpnm, ppmquantall, ppmrainbow +# Test pbmtox10bm, pnmnoraw, pnmtoplainpnm, ppmquantall # with trivial input. $i ${tmpdir}/test.pbm > /dev/null 2> /dev/null; |