2005-10-05 19:37:46 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
fail ()
|
|
|
|
{
|
|
|
|
echo "Test failed: $*"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
echo_v ()
|
|
|
|
{
|
|
|
|
if [ "$verbose" = "1" ]; then
|
|
|
|
echo "$*"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2005-12-28 00:35:52 +01:00
|
|
|
LC_ALL=en_US
|
|
|
|
export LC_ALL
|
2005-12-27 09:23:08 +01:00
|
|
|
|
2005-10-05 19:37:46 +02:00
|
|
|
error_out=/dev/null
|
|
|
|
if [ "$1" = "-v" ]; then
|
|
|
|
verbose=1
|
|
|
|
error_out=/dev/stderr
|
|
|
|
fi
|
|
|
|
for I in ${srcdir:-.}/collate/*.in; do
|
|
|
|
echo_v "Sorting $I"
|
|
|
|
name=`basename $I .in`
|
|
|
|
./unicode-collate $I > collate.out
|
2006-04-05 07:31:11 +02:00
|
|
|
diff collate.out ${srcdir:-.}/collate/$name.unicode ||
|
2005-10-05 19:37:46 +02:00
|
|
|
fail "unexpected error when using g_utf8_collate() on $I"
|
|
|
|
./unicode-collate --key $I > collate.out
|
2006-04-05 07:31:11 +02:00
|
|
|
diff collate.out ${srcdir:-.}/collate/$name.unicode ||
|
2005-10-05 19:37:46 +02:00
|
|
|
fail "unexpected error when using g_utf8_collate_key() on $I"
|
|
|
|
./unicode-collate --file $I > collate.out
|
2006-04-05 07:31:11 +02:00
|
|
|
diff collate.out ${srcdir:-.}/collate/$name.file ||
|
2005-10-05 19:37:46 +02:00
|
|
|
fail "unexpected error when using g_utf8_collate_key_for_filename() on $I"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo_v "All tests passed."
|