about summary refs log tree commit diff
path: root/iconv/tst-translit-mchar.sh
blob: ab7a7f872911cf2100ce9b61feb188e573925e0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
# Testing of multi-character transliterations
# Copyright (C) 2024 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.

# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, see
# <https://www.gnu.org/licenses/>.

set -e

common_objpfx=$1
run_program_prefix_before_env=$2
run_program_env=$3
run_program_prefix_after_env=$4

# Generate data files.
# The locale only defines the LC_CTYPE category, so we expect a failure
# due to warnings.
ret=0
${run_program_prefix_before_env} \
${run_program_env} \
I18NPATH=../localedata \
${run_program_prefix_after_env} ${common_objpfx}locale/localedef \
--quiet -i tst-translit-locale -f UTF-8 ${common_objpfx}iconv/tst-translit || ret=$?
if [ $ret -gt 1 ]; then
  echo "FAIL: Locale compilation for tst-translit-locale failed (error $ret)."
  exit 1
fi

set -x

# Run the test.
${run_program_prefix_before_env} \
${run_program_env} \
LOCPATH=${common_objpfx}iconv \
${run_program_prefix_after_env} ${common_objpfx}iconv/tst-translit-mchar

# Local Variables:
#  mode:shell-script
# End: