2 # Test of gettext functions.
3 # Copyright (C) 2000 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library.
6 # The GNU C Library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Library General Public License as
8 # published by the Free Software Foundation; either version 2 of the
9 # License, or (at your option) any later version.
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
14 # Library General Public License for more details.
16 # You should have received a copy of the GNU Library General Public
17 # License along with the GNU C Library; see the file COPYING.LIB. If
18 # not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 GCONV_PATH
=${common_objpfx}iconvdata
26 LOCPATH
=${objpfx}domaindir
31 # Generate the test data.
32 test -d ${objpfx}domaindir || mkdir
${objpfx}domaindir
33 # Create the locale directories.
34 test -d ${objpfx}domaindir
/lang1 ||
{
35 mkdir
${objpfx}domaindir
/lang1
36 for f
in ADDRESS COLLATE CTYPE IDENTIFICATION MEASUREMENT MONETARY NAME NUMERIC PAPER TELEPHONE TIME
; do
37 cp ${common_objpfx}localedata
/de_DE.ISO-8859-
1/LC_
$f \
38 ${objpfx}domaindir
/lang1
41 test -d ${objpfx}domaindir
/lang2 ||
{
42 mkdir
${objpfx}domaindir
/lang2
43 for f
in ADDRESS COLLATE CTYPE IDENTIFICATION MEASUREMENT MONETARY NAME NUMERIC PAPER TELEPHONE TIME
; do
44 cp ${common_objpfx}localedata
/de_DE.ISO-8859-
1/LC_
$f \
45 ${objpfx}domaindir
/lang2
48 test -d ${objpfx}domaindir
/lang
1/LC_MESSAGES ||
{
49 mkdir
${objpfx}domaindir
/lang
1/LC_MESSAGES
50 cp ${common_objpfx}localedata
/de_DE.ISO-8859-
1/LC_MESSAGES
/SYS_LC_MESSAGES \
51 ${objpfx}domaindir
/lang
1/LC_MESSAGES
53 test -d ${objpfx}domaindir
/lang
2/LC_MESSAGES ||
{
54 mkdir
${objpfx}domaindir
/lang
2/LC_MESSAGES
55 cp ${common_objpfx}localedata
/de_DE.ISO-8859-
1/LC_MESSAGES
/SYS_LC_MESSAGES \
56 ${objpfx}domaindir
/lang
2/LC_MESSAGES
60 msgfmt
-o ${objpfx}domaindir
/lang
1/LC_MESSAGES
/tstlang.mo \
63 msgfmt
-o ${objpfx}domaindir
/lang
2/LC_MESSAGES
/tstlang.mo \
68 ${common_objpfx}elf
/ld.so
--library-path $common_objpfx \
69 ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir
&&
70 cmp ${objpfx}tst-gettext2.out
- <<EOF
71 String1 - Lang1: 1st string
72 String2 - Lang1: 2nd string
73 String1 - Lang2: 1st string
74 String2 - Lang2: 2nd string
75 String1 - First string for testing.
76 String2 - Another string for testing.