• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test that a gettext() result comes out in the correct encoding, even when the
5# same message from the same catalog file was already looked up in a locale with
6# a different encoding.
7
8# This test works only on glibc systems, because it relies on HAVE_LOCALE_NULL
9# being set and on the notification by setlocale().
10: ${GLIBC2=no}
11test "$GLIBC2" = yes || {
12  echo "Skipping test: not a glibc system"
13  Exit 77
14}
15
16# This test works only on systems that have a de_DE.ISO-8859-1 and
17# de_DE.UTF-8 locale installed.
18LC_ALL=de_DE.ISO-8859-1 ../testlocale || {
19  if test -f /usr/bin/localedef; then
20    echo "Skipping test: locale de_DE.ISO-8859-1 not installed"
21  else
22    echo "Skipping test: locale de_DE.ISO-8859-1 not supported"
23  fi
24  Exit 77
25}
26LC_ALL=de_DE.UTF-8 ../testlocale || {
27  if test -f /usr/bin/localedef; then
28    echo "Skipping test: locale de_DE.UTF-8 not installed"
29  else
30    echo "Skipping test: locale de_DE.UTF-8 not supported"
31  fi
32  Exit 77
33}
34
35test -d in-sl-2 || mkdir in-sl-2
36test -d in-sl-2/de_DE || mkdir in-sl-2/de_DE
37test -d in-sl-2/de_DE/LC_MESSAGES || mkdir in-sl-2/de_DE/LC_MESSAGES
38
39: ${MSGFMT=msgfmt}
40${MSGFMT} -o in-sl-2/de_DE/LC_MESSAGES/tstprog.mo "$wabs_srcdir"/intl-setlocale-2.po
41
42../intl-setlocale-2-prg || Exit 1
43
44Exit 0
45