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