• 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 the gettext program with -e option.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8# Create binary test file in correct position.
9tmpfiles="$tmpfiles LC_MESSAGES"
10test -d LC_MESSAGES || mkdir LC_MESSAGES
11cp $top_srcdir/tests/test.mo LC_MESSAGES
12
13tmpfiles="$tmpfiles gt-test1.out"
14: ${GETTEXT=gettext}
15TEXTDOMAINDIR=.. LANGUAGE=tests \
16${GETTEXT} --env LC_ALL=en -e test 'SYS_(C)\n' | tr -d '\r' > gt-test1.out
17
18# Create correct file.
19tmpfile="$tmpfiles gtmf-test1.ok"
20cat <<EOF > gtmf-test1.ok
21MSGFMT(1) portable message object file compiler
22Copyright (C) 1995 Free Software Foundation
23Report bugs to <bug-gnu-utils@gnu.org>
24EOF
25
26: ${DIFF=diff}
27${DIFF} gtmf-test1.ok gt-test1.out
28result=$?
29
30rm -fr $tmpfiles
31
32exit $result
33