blob: 11db2f3af8111c42b3208230af2e5915697b7043 (
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
|
#! /bin/sh
# This script tests: pamfile
# Also requires: pamchannel pamtopnm
echo "Test 1"
pamfile testimg.ppm
pamfile testgrid.pbm
pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | pamtopnm | pamfile
pamchannel -tupletype="GRAYSCALE" -infile=testimg.ppm 0 | pamfile
echo "Test 2"
cat testgrid.pbm testgrid.pbm testgrid.pbm | pamfile -count
cat testgrid.pbm testgrid.pbm testgrid.pbm | pamfile -allimages
echo "Test 3"
pamfile -size testimg.ppm
pamfile -machine testimg.ppm
cat testgrid.pbm testimg.ppm testgrid.pbm | pamfile -machine
echo "Test Invalid"
. ./test-invalid.inc
invCmd "pamfile -size -machine testimg.ppm"
invCmd "pamfile -count -machine testimg.ppm"
head1_ppm=${tmpdir}/head1.ppm
head -n1 testimg.ppm > ${head1_ppm}
invCmd "pamfile ${head1_ppm}"
rm ${head1_ppm}
|