3 # Test handling of obsolete/untranslated messages.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mm-test3.in1 mm-test3.in2"
9 cat <<EOF > mm-test3.in1
16 msgstr "but with translation"
19 msgid "not existing without translation"
23 msgid "still existing"
26 #: should-not-be-here:10
27 #~ msgid "former obsolete"
31 #~ msgid "this stays obsolete"
32 #~ msgstr "even after running msgmerge"
35 # trailing comments should be removed
38 cat <<EOF > mm-test3.in2
43 msgid "still existing"
44 msgstr "here is normally no comment"
52 # trailing comments should be removed, even here
55 tmpfiles="$tmpfiles mm-test3.tmp mm-test3.out"
56 : ${MSGMERGE=msgmerge}
57 ${MSGMERGE} -q -o mm-test3.tmp mm-test3.in1 mm-test3.in2
58 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
59 LC_ALL=C tr -d '\r' < mm-test3.tmp > mm-test3.out
60 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
62 tmpfiles="$tmpfiles mm-test3.ok"
63 cat << EOF > mm-test3.ok
65 msgid "still existing"
69 msgid "former obsolete"
70 msgstr "but again useful"
75 #~ msgid "not existing"
76 #~ msgstr "but with translation"
78 #~ msgid "this stays obsolete"
79 #~ msgstr "even after running msgmerge"
83 ${DIFF} mm-test3.ok mm-test3.out