aboutsummaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
Diffstat (limited to 'filters')
-rwxr-xr-xfilters/test.sh19
1 files changed, 8 insertions, 11 deletions
diff --git a/filters/test.sh b/filters/test.sh
index cd4aeb88..35c8e698 100755
--- a/filters/test.sh
+++ b/filters/test.sh
@@ -34,14 +34,13 @@ export AERC_STYLESET=$style
export AERC_OSC8_URLS=1
do_test() {
- prefix="$1"
- tool_bin="$2"
- tool="$3"
- vec="$4"
- expected="$5"
+ tool_bin="$1"
+ tool="$2"
+ vec="$3"
+ expected="$4"
tmp=$(mktemp)
status=0
- $prefix $tool_bin < $vec > $tmp || status=$?
+ $tool_bin < $vec > $tmp || status=$?
if [ $status -eq 0 ] && diff -u "$expected" "$tmp"; then
echo "ok $tool < $vec > $tmp"
else
@@ -55,19 +54,17 @@ for vec in $here/vectors/*.in; do
expected=${vec%%.in}.expected
tool=$(basename $vec | sed 's/-.*//')
tool_bin=$here/../$tool
- prefix="$FILTERS_TEST_PREFIX $FILTERS_TEST_BIN_PREFIX"
- # execute source directly (and omit $...BIN_PREFIX) for interpreted filters
if ! [ -f "$tool_bin" ]; then
+ # execute source directly for interpreted filters
tool_bin=$here/$tool
- prefix="$FILTERS_TEST_PREFIX"
fi
- do_test "$prefix" "$tool_bin" "$tool" "$vec" "$expected"
+ do_test "$tool_bin" "$tool" "$vec" "$expected"
case $tool in # additional test runs
calendar) # Awk
if awk -W posix -- '' >/dev/null 2>&1; then
# test POSIX-compatibility
- do_test "$prefix" "awk -W posix -f $tool_bin" \
+ do_test "awk -W posix -f $tool_bin" \
"$tool (posix)" "$vec" "$expected"
else # "-W posix" is not supported and not ignored, skip test
echo "? $tool < $vec > $tmp [no '-W posix' support]"