]>
Commit | Line | Data |
---|---|---|
abbffdf9 UD |
1 | #! /bin/sh |
2 | # Test of gettext functions. | |
d4697bc9 | 3 | # Copyright (C) 2000-2014 Free Software Foundation, Inc. |
abbffdf9 | 4 | # This file is part of the GNU C Library. |
41bdb6e2 | 5 | |
abbffdf9 | 6 | # The GNU C Library is free software; you can redistribute it and/or |
41bdb6e2 AJ |
7 | # modify it under the terms of the GNU Lesser General Public |
8 | # License as published by the Free Software Foundation; either | |
9 | # version 2.1 of the License, or (at your option) any later version. | |
10 | ||
abbffdf9 UD |
11 | # The GNU C Library is distributed in the hope that it will be useful, |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 AJ |
14 | # Lesser General Public License for more details. |
15 | ||
16 | # You should have received a copy of the GNU Lesser General Public | |
59ba27a6 PE |
17 | # License along with the GNU C Library; if not, see |
18 | # <http://www.gnu.org/licenses/>. | |
abbffdf9 | 19 | |
57c69bef DL |
20 | set -e |
21 | ||
abbffdf9 | 22 | common_objpfx=$1 |
740b3dbe | 23 | test_program_prefix=$2 |
e40a0d21 JM |
24 | objpfx=$3 |
25 | malloc_trace=$4 | |
abbffdf9 | 26 | |
83b1b6d8 UD |
27 | LC_ALL=C |
28 | export LC_ALL | |
55985355 | 29 | |
abbffdf9 | 30 | # Generate the test data. |
9a5b9056 | 31 | |
cdfb970d | 32 | # Create the locale directories. |
9a5b9056 RM |
33 | mkdir -p ${objpfx}localedir/existing-locale/LC_MESSAGES |
34 | for f in ADDRESS COLLATE CTYPE IDENTIFICATION MEASUREMENT MONETARY NAME NUMERIC PAPER TELEPHONE TIME; do | |
1e6d2101 | 35 | cp -f ${common_objpfx}localedata/de_DE.UTF-8/LC_$f \ |
9a5b9056 RM |
36 | ${objpfx}localedir/existing-locale |
37 | done | |
1e6d2101 | 38 | cp -f ${common_objpfx}localedata/de_DE.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES \ |
9a5b9056 | 39 | ${objpfx}localedir/existing-locale/LC_MESSAGES |
abbffdf9 | 40 | |
9a5b9056 RM |
41 | # Create the domain directories. |
42 | mkdir -p ${objpfx}domaindir/existing-locale/LC_MESSAGES | |
43 | mkdir -p ${objpfx}domaindir/existing-locale/LC_TIME | |
abbffdf9 UD |
44 | # Populate them. |
45 | msgfmt -o ${objpfx}domaindir/existing-locale/LC_MESSAGES/existing-domain.mo \ | |
d2afebcc | 46 | -f ../po/de.po |
abbffdf9 | 47 | msgfmt -o ${objpfx}domaindir/existing-locale/LC_TIME/existing-time-domain.mo \ |
d2afebcc | 48 | -f ../po/de.po |
abbffdf9 | 49 | |
b344de2a UD |
50 | GCONV_PATH=${common_objpfx}iconvdata |
51 | export GCONV_PATH | |
52 | LOCPATH=${common_objpfx}localedata | |
53 | export LOCPATH | |
54 | ||
abbffdf9 | 55 | # Now run the test. |
cdfb970d | 56 | MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ |
740b3dbe | 57 | ${test_program_prefix} \ |
abbffdf9 UD |
58 | ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir |
59 | ||
60 | exit $? |