2008-04-18 23:28:33 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-09-23 15:32:10 +08:00
|
|
|
test -z "$srcdir" && srcdir=$(pwd)
|
2008-04-18 23:28:33 +08:00
|
|
|
|
2009-09-23 15:32:10 +08:00
|
|
|
. "$srcdir/test-lib.sh"
|
2008-04-18 23:28:33 +08:00
|
|
|
|
2009-12-01 03:01:31 +08:00
|
|
|
test_intro $this_test
|
2008-04-18 23:28:33 +08:00
|
|
|
|
|
|
|
fail=0
|
2009-12-01 03:01:31 +08:00
|
|
|
i=0
|
2008-04-18 23:28:33 +08:00
|
|
|
data_dir=$abs_srcdir/confdata
|
|
|
|
for f in $(cd "$data_dir" && echo *.conf)
|
2006-08-30 06:27:07 +08:00
|
|
|
do
|
2009-12-01 03:01:31 +08:00
|
|
|
i=`expr $i + 1`
|
2008-04-18 23:28:33 +08:00
|
|
|
"$abs_builddir/conftest" "$data_dir/$f" > "$f-actual"
|
|
|
|
expected="$data_dir"/`echo "$f" | sed s+\.conf$+\.out+`
|
|
|
|
if compare "$expected" "$f-actual"; then
|
2009-12-01 03:01:31 +08:00
|
|
|
ret=0
|
2006-08-30 06:27:07 +08:00
|
|
|
else
|
2009-12-01 03:01:31 +08:00
|
|
|
ret=1
|
2008-04-18 23:28:33 +08:00
|
|
|
fail=1
|
2006-08-30 06:27:07 +08:00
|
|
|
fi
|
2009-12-01 03:01:31 +08:00
|
|
|
test_result $i "$f" $ret
|
2006-08-30 06:27:07 +08:00
|
|
|
done
|
2008-04-18 23:28:33 +08:00
|
|
|
|
2009-12-01 03:01:31 +08:00
|
|
|
test_final $i $fail
|
|
|
|
|
2008-04-18 23:28:33 +08:00
|
|
|
(exit $fail); exit $fail
|