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