Update German translation
[glib.git] / tests / run-collate-tests.sh
blob24f3d690c6ae4499306058abe54c7173a40db163
1 #! /bin/sh
3 fail ()
5 echo "Test failed: $*"
6 exit 1
9 echo_v ()
11 if [ "$verbose" = "1" ]; then
12 echo "$*"
16 error_out=/dev/null
17 if [ "$1" = "-v" ]; then
18 verbose=1
19 error_out=/dev/stderr
20 fi
21 for I in ${srcdir:-.}/collate/*.in; do
22 echo_v "Sorting $I"
23 name=`basename $I .in`
24 ./unicode-collate $I > collate.out
25 if [ $? -eq 2 ]; then
26 exit 0
27 fi
28 diff collate.out ${srcdir:-.}/collate/$name.unicode ||
29 fail "unexpected error when using g_utf8_collate() on $I"
30 ./unicode-collate --key $I > collate.out
31 diff collate.out ${srcdir:-.}/collate/$name.unicode ||
32 fail "unexpected error when using g_utf8_collate_key() on $I"
33 ./unicode-collate --file $I > collate.out
34 diff collate.out ${srcdir:-.}/collate/$name.file ||
35 fail "unexpected error when using g_utf8_collate_key_for_filename() on $I"
36 done
38 echo_v "All tests passed."