1#! /bin/sh 2 3# Test handling of comments. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles mm-test4.in1.po mm-test4.in2.po" 9cat <<EOF > mm-test4.in1.po 10msgid "one" 11msgstr "eins" 12# This comment should be copied. 13msgid "two" 14msgstr "zwei" 15 16 17# And this one, too. 18#~ msgid "four" 19#~ msgstr "vier" 20EOF 21 22cat <<EOF > mm-test4.in2.po 23msgid "one" 24msgstr "" 25# This is a comment in the POT file. 26msgid "three" 27msgstr "" 28EOF 29 30tmpfiles="$tmpfiles mm-test4.tmp mm-test4.out" 31: ${MSGMERGE=msgmerge} 32${MSGMERGE} -q -o mm-test4.tmp mm-test4.in1.po mm-test4.in2.po 33test $? = 0 || { rm -fr $tmpfiles; exit 1; } 34tr -d '\r' < mm-test4.tmp > mm-test4.out 35test $? = 0 || { rm -fr $tmpfiles; exit 1; } 36 37tmpfiles="$tmpfiles mm-test4.ok" 38cat <<EOF > mm-test4.ok 39msgid "one" 40msgstr "eins" 41 42# This is a comment in the POT file. 43msgid "three" 44msgstr "" 45 46# This comment should be copied. 47#~ msgid "two" 48#~ msgstr "zwei" 49 50# And this one, too. 51#~ msgid "four" 52#~ msgstr "vier" 53EOF 54 55: ${DIFF=diff} 56${DIFF} mm-test4.ok mm-test4.out 57result=$? 58 59rm -fr $tmpfiles 60 61exit $result 62