about summary refs log tree commit diff
path: root/test/cis-roundtrip.test
blob: 895fe60e9856a126085a074c578f9c99b3b557e1 (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: pbmtocis cistopbm
# Also requires: pbmmake pamenlarge pamcut

  alias pbmtocis="${PBM_TESTPREFIX}pbmtocis"
  alias cistopbm="${PBM_TESTPREFIX}cistopbm"
  alias pbmmake="${PBM_BINPREFIX}pbmmake"
  alias pamenlarge="${PBM_BINPREFIX}pamenlarge"
  alias pamcut="${PBM_BINPREFIX}pamcut"
  shopt -s expand_aliases

# Output images produced by pbmtocis are of fixed size,
# either 128x96 or 256x192.
# Smaller input images are padded, larger ones are cropped.

# Test 1. Should print 2631579683 1546
pbmmake -g 128 96 | pbmtocis | cistopbm | cksum

# Test 2. Should print 2425386270 41
pbmtocis testgrid.pbm | cistopbm | pamcut 0 0 14 16 | cksum