blob: 70a1e85ba6b5bad728d5345a7aa152919bb9e9ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#! /bin/sh
# Test ISO C 99 <inttypes.h> format string directives.
# Verify that msgunfmt, applied to a .mo file of major revision 1 (with
# system-dependent strings), yields a PO file with c-format annotation, so that
# msgfmt applied to it will again produce a .mo file of major revision 1.
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles="$tmpfiles mu-2.in"
cat <<EOF > mu-2.in
#, c-format
msgid "truncating at %<PRIuMAX> bytes in output file %s"
msgstr "schneide bei %<PRIuMAX> Bytes in Ausgabedatei %s ab"
EOF
tmpfiles="$tmpfiles mu-2.mo"
: ${MSGFMT=msgfmt}
${MSGFMT} -o mu-2.mo mu-2.in
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
tmpfiles="$tmpfiles mu-2.out"
: ${MSGUNFMT=msgunfmt}
${MSGUNFMT} -o mu-2.out mu-2.mo
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
: ${DIFF=diff}
${DIFF} mu-2.in mu-2.out
result=$?
rm -fr $tmpfiles
exit $result
|