No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / format-c-3
blob4d705b0049bd3ba11ecb061531fc49dc11524231
1 #! /bin/sh
3 # Test ISO C 99 <inttypes.h> format string directives.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles fc3.pot"
9 : ${XGETTEXT=xgettext}
10 ${XGETTEXT} -o fc3.pot --omit-header --no-location ${top_srcdir}/tests/format-c-3-prg.c
12 tmpfiles="$tmpfiles fc3.ok"
13 cat <<EOF > fc3.ok
14 #, c-format
15 msgid "father of %<PRId8> children"
16 msgstr ""
17 EOF
19 : ${DIFF=diff}
20 ${DIFF} fc3.ok fc3.pot || exit 1
22 tmpfiles="$tmpfiles de.po"
23 cat <<EOF > de.po
24 #, c-format
25 msgid "father of %<PRId8> children"
26 msgstr "Vater von %<PRId8> Kindern"
27 EOF
29 tmpfiles="$tmpfiles de"
30 test -d de || mkdir de
31 test -d de/LC_MESSAGES || mkdir de/LC_MESSAGES
33 : ${MSGFMT=msgfmt}
34 ${MSGFMT} -o de/LC_MESSAGES/fc3.mo de.po
36 tmpfiles="$tmpfiles de.po.tmp"
37 : ${MSGUNFMT=msgunfmt}
38 ${MSGUNFMT} de/LC_MESSAGES/fc3.mo -o de.po.tmp
40 tmpfiles="$tmpfiles de.po.strip"
41 sed 1d < de.po > de.po.strip
43 : ${DIFF=diff}
44 ${DIFF} de.po.strip de.po.tmp || exit 1
46 LANGUAGE= ./fc3 de_DE
47 result=$?
49 rm -fr $tmpfiles
51 exit $result