File: gettext-1

package info (click to toggle)
gettext 0.17-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 64,956 kB
  • ctags: 38,653
  • sloc: ansic: 299,024; sh: 49,429; makefile: 8,097; perl: 4,181; lisp: 3,261; yacc: 665; java: 618; cs: 578; sed: 369; objc: 337; cpp: 325; awk: 80; tcl: 63; pascal: 12; php: 8
file content (32 lines) | stat: -rwxr-xr-x 741 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/sh

# Test the gettext program with -e option.

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

# Create binary test file in correct position.
tmpfiles="$tmpfiles LC_MESSAGES"
test -d LC_MESSAGES || mkdir LC_MESSAGES
cp $top_srcdir/tests/test.mo LC_MESSAGES

tmpfiles="$tmpfiles gt-test1.out"
: ${GETTEXT=gettext}
TEXTDOMAINDIR=.. LANGUAGE=tests \
${GETTEXT} --env LC_ALL=en -e test 'SYS_(C)\n' | tr -d '\r' > gt-test1.out

# Create correct file.
tmpfile="$tmpfiles gtmf-test1.ok"
cat <<EOF > gtmf-test1.ok
MSGFMT(1) portable message object file compiler
Copyright (C) 1995 Free Software Foundation
Report bugs to <bug-gnu-utils@gnu.org>
EOF

: ${DIFF=diff}
${DIFF} gtmf-test1.ok gt-test1.out
result=$?

rm -fr $tmpfiles

exit $result