about summary refs log tree commit diff
path: root/test/g3-roundtrip.test
blob: 323a26bf3cb0f5cec9ded40fb9dafc3c84b3f7e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /bin/bash
# This script tests: g3topbm pbmtog3
# Also requires: pnmcrop

  alias g3topbm="${PBM_TESTPREFIX}g3topbm"
  alias pbmtog3="${PBM_TESTPREFIX}pbmtog3"
  alias pnmcrop="${PBM_BINPREFIX}pnmcrop"
  shopt -s expand_aliases

pbmtog3 -nofixedwidth testgrid.pbm | \
g3topbm -width=14 | cmp -s - testgrid.pbm
echo $?

pbmtog3 -nofixedwidth -reversebits testgrid.pbm | \
g3topbm -width=14 -reversebits | cmp -s - testgrid.pbm
echo $?

pbmtog3 testgrid.pbm | \
g3topbm  | pnmcrop -white -right -bottom | \
 cmp -s - testgrid.pbm ; echo $?