#! /bin/sh
# This script tests: ppmforge
# Also requires: pamfile

echo "Test 1: Should print 256 256"

# Default size is 256 256
ppmforge -night -seed=1 | pamfile -size

echo "Test 2: Should print 40 30"

# Width is adjusted if not even
# becomes 40 in this case
ppmforge -night -seed=1 -width=39 -height=30 | pamfile -size

echo "Test 3: Should print 90 90"

# Width is adjusted if smaller than height
# brought up to 90 in this case
ppmforge -night -seed=1 -width=80 -height=90 | pamfile -size

echo "Test Invalid"

tmpdir=${tmpdir:-/tmp}
test_out=${tmpdir}/test_out

. ./test-invalid.inc

invCmd "ppmforge -seed=0 -night -dimension=0"
invCmd "ppmforge -seed=0 -dimension=10"
invCmd "ppmforge -seed=0 -dimension=-1"
invCmd "ppmforge -seed=0 -clouds -mesh=1.99"
invCmd "ppmforge -seed=0 -clouds -power=0"
invCmd "ppmforge -seed=0 -ice=-1"
invCmd "ppmforge -seed=0 -glaciers=-1"
