Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / xgettext-c-1
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # This test often fails during development. It works after "make dist".
5
6 # Test C support.
7
8 : ${XGETTEXT=xgettext}
9 ${XGETTEXT} -d xg-c-1.tmp -k_ --omit-header --no-location \
10  "$abs_top_srcdir"/src/xgettext.c "$abs_top_srcdir"/src/msgfmt.c || exit 1
11 LC_ALL=C tr -d '\r' < xg-c-1.tmp.po > xg-c-1.po || exit 1
12
13 : ${DIFF=diff}
14 ${DIFF} "$abs_srcdir"/xg-c-1.ok.po xg-c-1.po
15 result=$?
16
17 exit $result