mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 10:26:16 +01:00
c5d661b4c4
Most of these scripts can probably just be deleted (see issue #2045), but for now it was easier to just mechanically fix the shellcheck warnings in them, rather than think about whether we actually needed the script. Fixes done using shellcheck 0.7.0 with default options. I haven’t tested any of the changes. Signed-off-by: Philip Withnall <withnall@endlessm.com>
37 lines
853 B
Bash
Executable File
37 lines
853 B
Bash
Executable File
#! /bin/sh
|
|
|
|
fail ()
|
|
{
|
|
echo "Test failed: $*"
|
|
exit 1
|
|
}
|
|
|
|
echo_v ()
|
|
{
|
|
if [ "$verbose" = "1" ]; then
|
|
echo "$*"
|
|
fi
|
|
}
|
|
|
|
if [ "$1" = "-v" ]; then
|
|
verbose=1
|
|
fi
|
|
for I in "${srcdir:-.}"/collate/*.in; do
|
|
echo_v "Sorting $I"
|
|
name=$(basename "${I}" .in)
|
|
./unicode-collate "${I}" > collate.out
|
|
if [ $? -eq 2 ]; then
|
|
exit 0
|
|
fi
|
|
diff collate.out "${srcdir:-.}/collate/$name.unicode" ||
|
|
fail "unexpected error when using g_utf8_collate() on $I"
|
|
./unicode-collate --key "${I}" > collate.out
|
|
diff collate.out "${srcdir:-.}/collate/$name.unicode" ||
|
|
fail "unexpected error when using g_utf8_collate_key() on $I"
|
|
./unicode-collate --file "${I}" > collate.out
|
|
diff collate.out "${srcdir:-.}/collate/$name.file" ||
|
|
fail "unexpected error when using g_utf8_collate_key_for_filename() on $I"
|
|
done
|
|
|
|
echo_v "All tests passed."
|