69a9fdb559ff07c77be310eab0057ffc9755f872
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-1
1 #! /bin/sh
2
3 # This test often fails during development. It works after "make dist".
4
5 # Test -x option.
6
7 tmpfiles=""
8 trap 'rm -fr $tmpfiles' 1 2 3 15
9
10 tmpfiles="$tmpfiles zero-domain.po xg-test1.err"
11 rm -f zero-domain.po
12 : ${XGETTEXT=xgettext}
13 LC_MESSAGES=C LC_ALL= \
14 ${XGETTEXT} -k_ -d zero-domain -x $top_srcdir/po/gettext-tools.pot \
15   $top_srcdir/src/xgettext.c >xg-test1.err 2>&1
16 result=$?
17 cat xg-test1.err | grep -v 'warning: Charset' | grep -v '^ '
18 test $result = 0 || { rm -fr $tmpfiles; exit 1; }
19
20 test ! -f zero-domain.po
21 result=$?
22
23 rm -fr $tmpfiles
24
25 exit $result