#! /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"

. ${srcdir}/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"
