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

${PBM_BINPREFIX}pgmramp -maxval=5 -lr 256 1 >${tmpdir}/test.pgm
${PBM_BINPREFIX}pamseq 3 5 -tupletype=RGB | ${PBM_BINPREFIX}pamtopnm \
  >${tmpdir}/palette

# Test 1.
${PBM_TESTPREFIX}pgmtoppm green ${tmpdir}/test.pgm | cksum

${PBM_TESTPREFIX}pgmtoppm yellow-blue ${tmpdir}/test.pgm | cksum

${PBM_TESTPREFIX}pgmtoppm -map=${tmpdir}/palette ${tmpdir}/test.pgm | cksum

rm ${tmpdir}/test.pgm ${tmpdir}/palette