about summary refs log tree commit diff
path: root/test/pamtable.test
blob: d42187f9bf1ce172b4a27443a042ec2b2e77a2e5 (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
#! /bin/sh
# This script tests: pamtable
# Also requires: pamseq pamrestack pamdepth pbmmake ppmrainbow

echo "Test 1"
pamtable testgrid.pbm

echo
echo "Test 2"
pamseq 3 2 -tupletype=RGB | pamtable

echo
echo "Test 3"
pamseq 4 1 -tupletype=RGBA | pamtable

echo
echo "Test 4"
pbmmake -gray 5 1 | pamtable -tuple

echo
echo "Test 5"
pbmmake -gray 1 10 | pamtable -tuple

echo
echo "Test 6"
pamseq 3 3 -tupletype=RGB | pamrestack -width=3 | pamtable -tuple

echo
echo "Test 7"
pamseq 2 255 -max=50,255 -step=10,17 | pamrestack -width=8 | \
  pamtable -hex

echo
echo "Test 8"
for maxval in 9 10 9999 10000 65535
  do
  pbmmake -g 2 2 | pamdepth ${maxval} | pamtable
  echo
  ppmrainbow -width=3 -height=2 -norepeat black white | \
    pamdepth ${maxval} | pamtable
  echo
  ppmrainbow -width=4 -height=2 -norepeat red blue green | \
    pamdepth ${maxval} | pamtable
  echo
  done

echo "Test Invalid"

. ${srcdir}/test-invalid.inc

input1_pam=${tmpdir}/input1.pam

pamseq -tupletype="void" 1 1 > ${input1_pam}
invCmd "pamtable -tuple -hex ${input1_pam}"
rm ${input1_pam}