mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
81f0bb11a9
2005-12-05 Matthias Clasen <mclasen@redhat.com> * tests/Makefile.am (TESTS_ENVIRONMENT): * tests/gobject/Makefile.am (TESTS_ENVIRONMENT): Set MALLOC_CHECK_ and MALLOC_PERTURB_ * tests/run-collate-tests.sh: Run the collation tests explicitly in en_US locale. (#320463)
40 lines
888 B
Bash
Executable File
40 lines
888 B
Bash
Executable File
#! /bin/sh
|
|
|
|
fail ()
|
|
{
|
|
echo "Test failed: $*"
|
|
exit 1
|
|
}
|
|
|
|
echo_v ()
|
|
{
|
|
if [ "$verbose" = "1" ]; then
|
|
echo "$*"
|
|
fi
|
|
}
|
|
|
|
LANG=en_US
|
|
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
|
|
if ! diff collate.out ${srcdir:-.}/collate/$name.unicode; then
|
|
fail "unexpected error when using g_utf8_collate() on $I"
|
|
fi
|
|
./unicode-collate --key $I > collate.out
|
|
if ! diff collate.out ${srcdir:-.}/collate/$name.unicode; then
|
|
fail "unexpected error when using g_utf8_collate_key() on $I"
|
|
fi
|
|
./unicode-collate --file $I > collate.out
|
|
if ! diff collate.out ${srcdir:-.}/collate/$name.file; then
|
|
fail "unexpected error when using g_utf8_collate_key_for_filename() on $I"
|
|
fi
|
|
done
|
|
|
|
echo_v "All tests passed."
|