about summary refs log tree commit diff
path: root/test/ppmchange-roundtrip.test
blob: 071c0b93a98b4fc16772bc3927c4988f24072834 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/bash
# This script tests: ppmchange
# Also requires: pgmtopbm pnminvert ppmtopgm

  alias ppmchange="${PBM_TESTPREFIX}ppmchange"
  alias pgmtopbm="${PBM_BINPREFIX}pgmtopbm"
  alias pnminvert="${PBM_BINPREFIX}pnminvert"
  alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm"
  shopt -s expand_aliases

ppmchange black white white black testgrid.pbm | \
pnminvert | ppmtopgm | \
pgmtopbm -th -val=0.5 | cksum

ppmchange  black white white black testgrid.pbm | \
ppmchange  black white white black | \
ppmtopgm | pgmtopbm -th -val=0.5 | cksum