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