#! /bin/sh
# This script tests: pbmnoise
# Also requires:

echo "Test Invalid"

. ${srcdir}/test-invalid.inc

# Invalid -ratio arguments

invCmd "pbmnoise -ratio       100 100"
invCmd "pbmnoise -ratio 0     1  100"
invCmd "pbmnoise -ratio=1.1   100 100"
invCmd "pbmnoise -ratio=-1    100 100"
invCmd "pbmnoise -ratio=half  100 100"
invCmd "pbmnoise -ratio=0/1/1 100 100"
invCmd "pbmnoise -ratio=-1/2  100 100"
invCmd "pbmnoise -ratio=1/0   100 100"
invCmd "pbmnoise -ratio=/2    100 100"
invCmd "pbmnoise -ratio=4/2   100 100"
invCmd "pbmnoise -ratio=6/    100 100"
invCmd "pbmnoise -ratio=1.0/2.0 100 100"

# denominator must be power of 2
invCmd "pbmnoise -ratio=3/9  100 100"
invCmd "pbmnoise -ratio=a/2  100 100"
invCmd "pbmnoise -ratio=2/a  100 100"
invCmd "pbmnoise -ratio=1/-2 100 100"

# Denominator must be 65536 or less
invCmd "pbmnoise -ratio=1/65537 100 100"
invCmd "pbmnoise -ratio=1/131072 100 100"

# Other
invCmd "pbmnoise"
invCmd "pbmnoise 100"
invCmd "pbmnoise 100 0"
invCmd "pbmnoise 0 100"
invCmd "pbmnoise 100 200 300"
invCmd "pbmnoise -endian=large 100 100"
invCmd "pbmnoise -randomseed 100 100"
invCmd "pbmnoise -randomseed=-1 100 100"
invCmd "pbmnoise -randomseed=0.1 100 100"
