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