1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test the gettext program with -e option.
5
6# Create binary test file in correct position.
7test -d gt-1 || mkdir gt-1
8test -d gt-1/LC_MESSAGES || mkdir gt-1/LC_MESSAGES
9cp "$abs_srcdir"/test.mo gt-1/LC_MESSAGES
10
11: ${GETTEXT=gettext}
12TEXTDOMAINDIR=. LANGUAGE=gt-1 \
13${GETTEXT} --env LC_ALL=en -e test 'SYS_(C)\n' | LC_ALL=C tr -d '\r' > gt-test1.out
14
15# Create correct file.
16cat <<EOF > gtmf-test1.ok
17MSGFMT(1) portable message object file compiler
18Copyright (C) 1995 Free Software Foundation
19Report bugs to <bug-gnu-utils@gnu.org>
20EOF
21
22: ${DIFF=diff}
23${DIFF} gtmf-test1.ok gt-test1.out
24result=$?
25
26exit $result
27