about summary refs log tree commit diff
path: root/test/pbmmake.test
blob: eb4be6ea0253dacdbbaadddff24d1f0769a77e57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/bash
# This script tests: pbmmake
# Also requires:

echo "Test 1."

for i in `seq 1 8`
do
for color in -white -black -gray
do
pbmmake -plain $color $i $i | tr -d '\n'; echo
done

echo "Test 2."

done
for i in `seq 8 5 98`
do
 ( pbmmake -w $i $i ;
  pbmmake -b $i $i ;
  pbmmake  -g $i $i ) | cksum
done

echo "Test 3."

echo 1>&2
echo "Invalid command-line argument combinations." 1>&2
echo "Error messages should appear below the line." 1>&2
echo "-----------------------------------------------------------" 1>&2

pbmmake -b -w -plain 1 1 || echo "Expected error 1"
pbmmake -b -g -plain 1 1 || echo "Expected error 2"
pbmmake -white -gray -plain 1 1 || echo "Expected error 3"
pbmmake -white -plain   || echo "Expected error 4"
pbmmake -white -plain 1 || echo "Expected error 5"
pbmmake -white -plain 1 0 || echo "Expected error 6"
pbmmake -white -plain 0 1 || echo "Expected error 7"
pbmmake -white -plain 1 1 1 || echo "Expected error 8"
pbmmake -plain 1 1 ||  echo "Expected error 9"