#!/bin/sh . "$(dirname "$0")/functions.inc" PROGRAM="$DIR/bug-memory" if [ ! -f "$PROGRAM" ]; then echo "error: test/bug-memory is missing" exit 1 fi start_test "zzuf memory exhaustion test" new_test "bug-memory < /file-00" if ! $PROGRAM < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" fi new_test "zzuf -qi -r0 bug-memory < /file-00" if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" fi new_test "zzuf -qi bug-memory < file-00" if "$ZZUF" -M 256 -qi "$PROGRAM" < "$DIR/file-00"; then fail_test " unexpected exit status $?" else pass_test " OK" fi stop_test