No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-c-4
blob5dd8c0cb3dc0b7c936c0922e00991d57c0a78362
1 #! /bin/sh
3 # Test C support: --trigraphs option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-c-4.in.c"
9 cat <<EOF > xg-c-4.in.c
10 main()??<printf(gettext("Hello, " "World!" "??/n")); ??>
11 EOF
13 tmpfiles="$tmpfiles xg-c-4.po"
14 : ${XGETTEXT=xgettext}
15 ${XGETTEXT} --omit-header --no-location --trigraphs xg-c-4.in.c -d xg-c-4
16 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
18 tmpfiles="$tmpfiles xg-c-4.ok"
19 cat <<EOF > xg-c-4.ok
20 #, c-format
21 msgid "Hello, World!\n"
22 msgstr ""
23 EOF
25 : ${DIFF=diff}
26 ${DIFF} xg-c-4.ok xg-c-4.po
27 result=$?
29 rm -fr $tmpfiles
31 exit $result