about summary refs log tree commit diff
path: root/test/pgmtoppm.test
blob: 70df0d972243d300e44a7c80025d7b050eb2804d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/bash
# This script tests: pgmtoppm
# Also requires: pamseq pamtopnm pgmramp


tmpdir=${tmpdir:-/tmp}

test_pgm=${tmpdir}/test.pgm
palette=${tmpdir}/palette

pgmramp -maxval=5 -lr 256 1 >${test_pgm}
pamseq 3 5 -tupletype=RGB | pamtopnm \
  >${palette}

# Test 1.
pgmtoppm green ${test_pgm} | cksum

pgmtoppm yellow-blue ${test_pgm} | cksum

pgmtoppm -map=${palette} ${test_pgm} | cksum

rm ${test_pgm} ${palette}