1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test general operation and line wrapping. 5 6cat <<EOF > mm-test1.in1 7# first 8#. this should be discarded 9msgid "1" 10msgstr "1x" 11# second 12#: bogus:1 13msgid "2" 14msgstr "this is a really long msgstr " 15 "used to test the wrapping to " 16 "make sure it works after all " 17 "what is a test for if not to test things?" 18# third 19msgid "3" 20msgstr "3z" 21EOF 22 23cat <<EOF > mm-test1.in2 24#. this is the first 25#: snark.c:345 26msgid "1" 27msgstr "" 28#. this is the second 29#: hunt.c:759 30msgid "2" 31msgstr "" 32#. this is the third 33#: boojum.c:300 34msgid "3" 35msgstr "" 36EOF 37 38: ${MSGMERGE=msgmerge} 39${MSGMERGE} -q -o mm-test1.tmp mm-test1.in1 mm-test1.in2 || Exit 1 40LC_ALL=C tr -d '\r' < mm-test1.tmp > mm-test1.out || Exit 1 41 42cat << EOF > mm-test1.ok 43# first 44#. this is the first 45#: snark.c:345 46msgid "1" 47msgstr "1x" 48 49# second 50#. this is the second 51#: hunt.c:759 52msgid "2" 53msgstr "" 54"this is a really long msgstr used to test the wrapping to make sure it works " 55"after all what is a test for if not to test things?" 56 57# third 58#. this is the third 59#: boojum.c:300 60msgid "3" 61msgstr "3z" 62EOF 63 64: ${DIFF=diff} 65${DIFF} mm-test1.ok mm-test1.out 66result=$? 67 68exit $result 69