diff options
author | Henning Makholm <henning@makholm.net> | 2006-02-19 18:00:00 (EST) |
---|---|---|
committer | Julien Jorge <julien.jorge@stuff-o-matic.com> | 2013-01-10 16:05:04 (EST) |
commit | 4877693228e5f942db451c5f2b0ccabb5b050813 (patch) | |
tree | 72b1f863eaa746e6aac955172e7081e40ee0418c /test/dotest | |
parent | 00a8b13b5bf8cf2c367a0db3ae09086e45230968 (diff) | |
download | xcftools-4877693228e5f942db451c5f2b0ccabb5b050813.zip xcftools-4877693228e5f942db451c5f2b0ccabb5b050813.tar.gz xcftools-4877693228e5f942db451c5f2b0ccabb5b050813.tar.bz2 |
Import of release 1.0.0
Diffstat (limited to 'test/dotest')
-rwxr-xr-x | test/dotest | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/dotest b/test/dotest index 9074270..9a9d38d 100755 --- a/test/dotest +++ b/test/dotest @@ -42,7 +42,7 @@ failed() { testrun() { - if [ x$1 == x--exit ] + if [ x$1 = x--exit ] then want=$2 ; shift ; @@ -51,8 +51,17 @@ testrun() { want=0 ; fi (( totaltests++ )) - echo "===>" "$@" - "$@" > stdout.txt 2> stderr.txt + if [ x$2 = x--pipe ] + then + pgm="$1" + pipe="$3" ; + shift ; shift ; shift ; + echo "===>" $pipe "|" $pgm "$@" + $pipe | $pgm "$@" > stdout.txt 2> stderr.txt + else + echo "===>" "$@" + "$@" > stdout.txt 2> stderr.txt + fi got=$? if [ $want = $got ] then @@ -180,11 +189,13 @@ errtest 20 xcf2png $S/tiletest.xcf.gz --percent 33 Mid echo > expected:stderr \ "The image has no layer called 'MID'" -errtest 22 xcf2pnm $S/tiletest.xcf.gz Background MID -o foo.pnm +errtest 22 xcf2pnm $S/tiletest.xcf.gz -z Background MID -o foo.pnm +# This also tests reading from stdin echo > expected:stderr \ "Layer 'Vert' has no layer mask to enable" -errtest 22 xcf2pnm $S/tiletest.xcf.gz Background Vert --mask Horiz --nomask +errtest 22 xcf2pnm --pipe "zcat $S/tiletest.xcf.gz" \ + - Background Vert --mask Horiz --nomask echo > expected:stderr \ "Grayscale output selected, but colored pixel(s) found" |