about summary refs log tree commit diff
path: root/test/stdin-pam1.test
blob: 7cb15dfc401dd5f2f970c9c75ef751cf6e34062a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#! /bin/bash
# This script tests: pamaddnoise pamaltsat pambackground pambayer
# This script tests: pambrighten pamcat pamcut pamdeinterlace pamdepth pamditherbw
# This script tests: pamedge pamexec pamfile pamfind pamfix pamflip
# This script tests: pamfunc pamhomography pamhue pamlevels
# This script tests: pammixinterlace pammosaicknit pamoil
# This script tests: pamperspective pamrecolor pamrestack pamrubber pamscale
# This script tests: pamshadedrelief pamsharpness pamshuffle pamsistoaglyph
# This script tests: pamslice pamstack pamstereogram pamstretch
# This script tests: pamstretch-gen pamsumm pamsummcol pamtable pamthreshold
# This script tests: pamtilt pamtopnm pamwipeout
# Also requires: pbmmake

tmpdir=${tmpdir:-/tmp}
out1=${tmpdir}/out1
out2=${tmpdir}/out2
small_pbm=${tmpdir}/small.pbm

pbmmake -g 5 5 > ${small_pbm}

for testprog in \
    "pamaddnoise -seed=1" \
    "pamaltsat -strength=1" \
    pambackground \
    "pambayer -type=2" \
    pambrighten \
    "pamcat -topbottom" \
    pamcut \
    pamdeinterlace \
    "pamdepth 15" \
    "pamditherbw -threshold" \
    pamedge \
    "pamexec cat" \
    "pamfile -size" \
    "pamfind -target=1" \
    pamfix \
    "pamflip -lr" \
    "pamfunc -not" \
    "pamhomography -from 0,0,0,1,1,0,1,1" \
    "pamhue -huechange=60" \
    "pamlevels -f1 rgb:0/0/0 -t1 rgb:0/0/0 -f2 rgb:ff/ff/ff -t2 rgb:ff/ff/ff" \
    pammixinterlace \
    pammosaicknit \
    pamoil \
    "pamperspective 0 0 0 1 1 0 1 1" \
    pamrecolor \
    pamrestack \
    "pamrubber -quad 1 1 2 2" \
    "pamscale 2" \
    pamshadedrelief \
    pamsharpness \
    "pamshuffle -randomseed=1" \
    pamsistoaglyph \
    "pamslice -row=1" \
    pamstack \
    "pamstereogram -randomseed=1" \
    "pamstretch 1" \
    "pamstretch-gen 1" \
    "pamsumm -max" \
    "pamsummcol -mean" \
    pamtable \
    pamthreshold \
    pamtilt \
    pamtopnm \
    "pamwipeout -tb"
  do
  ${testprog} ${small_pbm} > ${out1};      status1=$?
  ${testprog} < ${small_pbm} > ${out2};    status2=$?
  test -s ${out1};                         status3=$?
  cmp -s ${out1} ${out2}
  echo ${testprog}": "${status1} ${status2} ${status3} $?
  rm ${out1} ${out2}
  done

rm ${small_pbm}