about summary refs log tree commit diff
path: root/test/pamcut.test
blob: 5a94de46ae94f560a119e81e73f6921e83d865ed (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: pamcut pbmmake
# Also requires: 

  alias pamcut="${PBM_TESTPREFIX}pamcut"
  alias pbmmake="${PBM_TESTPREFIX}pbmmake"
  shopt -s expand_aliases

# Test 1.  Should print 2958909756 124815
pamcut -top 0 -left 0 -width 260 -height 160 \
  -pad testimg.ppm | cksum
# Test 2.  Should print 1550940962 10933
pamcut -top 200 -left 120 -width 40 -height 40 \
  -pad testimg.ppm | cksum
# Test 3.  Should print 708474423 14
pamcut -top 5 -left 5 -bottom 5 -right 5 testimg.ppm | cksum
# Test 3.  Should print 3412257956 129
pbmmake -g 50 50 | pamcut 5 5 30 30 | cksum