#!/bin/sh

# Tests should be run from the tests directory
if ! test "$(basename "$PWD")" = "t"
then
	        cd t || exit 2
fi

# We need an executable
test -x ../w3m || exit 2

test "$@" || set -- [0-9][0-9][0-9][0-9]*

for t
do
	case "$t" in *.orig|*.rej) continue ;; esac
	./$t || exit 1
done
