1#! /bin/sh 2 3# Test --update: location changed, and xgettext comment added. Both changes 4# must be reflected in the resulting PO file. With Java .properties syntax. 5 6tmpfiles="" 7trap 'rm -fr $tmpfiles' 1 2 3 15 8 9tmpfiles="$tmpfiles mm-p-2.po" 10cat <<\EOF > mm-p-2.po 11#: cogarithmetic.cc:12 12white=wei\u00df 13EOF 14 15tmpfiles="$tmpfiles mm-p-2.pot" 16cat <<EOF > mm-p-2.pot 17#. location changed 18#: cogarithmetic.cc:33 19!white= 20EOF 21 22tmpfiles="$tmpfiles mm-p-2.po~" 23: ${MSGMERGE=msgmerge} 24${MSGMERGE} -q --properties-input --update mm-p-2.po mm-p-2.pot 25test $? = 0 || { rm -fr $tmpfiles; exit 1; } 26 27tmpfiles="$tmpfiles mm-p-2.ok" 28cat <<\EOF > mm-p-2.ok 29#. location changed 30#: cogarithmetic.cc:33 31white=wei\u00df 32EOF 33 34: ${DIFF=diff} 35${DIFF} mm-p-2.ok mm-p-2.po 36result=$? 37 38rm -fr $tmpfiles 39 40exit $result 41