#! /bin/sh

. ${srcdir:=.}/t.frame

# Check if data integrity is maintained in passthrough mode.

# Generate input file with embedded NUL, CR and LF.
echo 74 65 73 74 00 74 65 0d 73 74 0d 0a \
| ./dehex > "$TMPDIR"/input

# Check seekable input
$VAL $BOGOFILTER -e -p -C < "$TMPDIR/input" > "$TMPDIR/output"
./dumbhead -1 < "$TMPDIR"/output | cmp - "$TMPDIR/input"

# Check non-seekable input
cat "$TMPDIR/input" | $VAL $BOGOFILTER -e -p -C > "$TMPDIR/output"
./dumbhead -1 < "$TMPDIR"/output | cmp - "$TMPDIR/input"
