Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgunfmt-2
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test ISO C 99 <inttypes.h> format string directives.
5 # Verify that msgunfmt, applied to a .mo file of major revision 1 (with
6 # system-dependent strings), yields a PO file with c-format annotation, so that
7 # msgfmt applied to it will again produce a .mo file of major revision 1.
8
9 cat <<EOF > mu-2.in
10 #, c-format
11 msgid "truncating at %<PRIuMAX> bytes in output file %s"
12 msgstr "schneide bei %<PRIuMAX> Bytes in Ausgabedatei %s ab"
13 EOF
14
15 : ${MSGFMT=msgfmt}
16 ${MSGFMT} -o mu-2.mo mu-2.in || exit 1
17
18 : ${MSGUNFMT=msgunfmt}
19 ${MSGUNFMT} -o mu-2.tmp mu-2.mo || exit 1
20 LC_ALL=C tr -d '\r' < mu-2.tmp > mu-2.out || exit 1
21
22 : ${DIFF=diff}
23 ${DIFF} mu-2.in mu-2.out
24 result=$?
25
26 exit $result