about summary refs log tree commit diff
path: root/test/ppmmake.test
blob: 3527511055a3f51c7ef9360c5668c8246be4e7ba (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
#! /bin/sh
# This script tests: ppmmake
# Also requires:

echo "Test 1"

ppmmake -maxval=5 -plain rgb:00/00/00 1 1
ppmmake -maxval=65535 -plain rgb:ff/ff/ff 1 1
ppmmake -maxval=5 rgb:ff/80/80 50 100 | cksum
ppmmake rgbi:0.5/1.0/0 2 2 | cksum
ppmmake red 50 50  | cksum

echo "Test Invalid"

. ./test-invalid.inc

invCmd "ppmmake rgb:gg/00/00  2 2"
invCmd "ppmmake rgb:ff/ff/00  2"
invCmd "ppmmake rgbi:1.1/0/0  2 2"
invCmd "ppmmake rgbi:1.0/.5   2 2"
invCmd "ppmmake rainbow       2 2"
invCmd "ppmmake               2 2"
invCmd "ppmmake blue -maxval=0 2 2"
invCmd "ppmmake blue -maxval=-1 2 2"
invCmd "ppmmake blue -maxval=65536 2 2"
export  RGBDEF=/dev/null
invCmd "ppmmake red 2 2"