about summary refs log tree commit diff
path: root/test/ppmforge-parameters.test
blob: 0525e7af87acd4acea50a494444b7c685e0da405 (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
#! /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

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