summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-1
blob: c071004e87ce3930ae3f34ca5deeb57975934f5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh

# This test often fails during development. It works after "make dist".

# One argument is required which is the path to the toplevel directory
# of the distribution.

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

tmpfiles="$tmpfiles xg-test1.po"
: ${XGETTEXT=xgettext}
${XGETTEXT} -d xg-test1 -k_ --omit-header --no-location \
 $top_srcdir/src/xgettext.c $top_srcdir/src/msgfmt.c
test $? = 0 || { rm -fr $tmpfiles; exit 1; }

: ${DIFF=diff}
${DIFF} $top_srcdir/tests/xg-test1.ok.po xg-test1.po
result=$?

rm -fr $tmpfiles

exit $result