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
9cat <<EOF > mu-2.in
10#, c-format
11msgid "truncating at %<PRIuMAX> bytes in output file %s"
12msgstr "schneide bei %<PRIuMAX> Bytes in Ausgabedatei %s ab"
13EOF
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
20LC_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
24result=$?
25
26exit $result
27