]> git.ipfire.org Git - thirdparty/glibc.git/blame - intl/tst-gettext.sh
Update copyright notices with scripts/update-copyrights
[thirdparty/glibc.git] / intl / tst-gettext.sh
CommitLineData
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
20set -e
21
abbffdf9 22common_objpfx=$1
740b3dbe 23test_program_prefix=$2
e40a0d21
JM
24objpfx=$3
25malloc_trace=$4
abbffdf9 26
83b1b6d8
UD
27LC_ALL=C
28export LC_ALL
55985355 29
abbffdf9 30# Generate the test data.
9a5b9056 31
cdfb970d 32# Create the locale directories.
9a5b9056
RM
33mkdir -p ${objpfx}localedir/existing-locale/LC_MESSAGES
34for 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
37done
1e6d2101 38cp -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.
42mkdir -p ${objpfx}domaindir/existing-locale/LC_MESSAGES
43mkdir -p ${objpfx}domaindir/existing-locale/LC_TIME
abbffdf9
UD
44# Populate them.
45msgfmt -o ${objpfx}domaindir/existing-locale/LC_MESSAGES/existing-domain.mo \
d2afebcc 46 -f ../po/de.po
abbffdf9 47msgfmt -o ${objpfx}domaindir/existing-locale/LC_TIME/existing-time-domain.mo \
d2afebcc 48 -f ../po/de.po
abbffdf9 49
b344de2a
UD
50GCONV_PATH=${common_objpfx}iconvdata
51export GCONV_PATH
52LOCPATH=${common_objpfx}localedata
53export LOCPATH
54
abbffdf9 55# Now run the test.
cdfb970d 56MALLOC_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
60exit $?