1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test --sort-by-file option, when no file positions are present.
cat <<\EOF > mm-test15.po
msgid "a"
msgstr "a"
#~ msgid "c"
#~ msgstr "c"
#~ msgid "d"
#~ msgstr "d"
#~ msgid "b"
#~ msgstr "b"
EOF
cat <<\EOF > mm-test15.pot
msgid "a"
msgstr ""
EOF
: ${MSGMERGE=msgmerge}
${MSGMERGE} -q --sort-by-file -o mm-test15.tmp mm-test15.po mm-test15.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test15.tmp > mm-test15.po2 || Exit 1
${MSGMERGE} -q --sort-by-file -o mm-test15.tmp mm-test15.po2 mm-test15.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test15.tmp > mm-test15.po3 || Exit 1
cat <<\EOF > mm-test15.ok
msgid "a"
msgstr "a"
#~ msgid "b"
#~ msgstr "b"
#~ msgid "c"
#~ msgstr "c"
#~ msgid "d"
#~ msgstr "d"
EOF
: ${DIFF=diff}
${DIFF} mm-test15.ok mm-test15.po2 || Exit 1
${DIFF} mm-test15.ok mm-test15.po3 || Exit 1
Exit 0
|