• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test that bind_textdomain_codeset() works.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8# This test works only on systems that have a traditional french locale
9# installed.
10# gettext-4.po is actually a German PO file, but only the encoding of the
11# locale matters, not the language. configure has already checked whether
12# a traditional french locale is installed; no need to check also for a
13# traditional german locale.
14: ${LOCALE_FR=fr_FR}
15{ test $LOCALE_FR != none && LC_ALL=$LOCALE_FR ./testlocale; } || {
16  if test -f /usr/bin/localedef; then
17    echo "Skipping test: no traditional french locale is installed"
18  else
19    echo "Skipping test: no traditional french locale is supported"
20  fi
21  exit 77
22}
23
24tmpfiles="$tmpfiles fr"
25test -d fr || mkdir fr
26test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES
27
28: ${MSGFMT=msgfmt}
29${MSGFMT} -o fr/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po
30
31./gettext-4-prg $LOCALE_FR || exit 1
32
33rm -fr $tmpfiles
34
35exit 0
36