1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test --add-location=file option. 5 6cat <<EOF > mm-test25.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-test25.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} --add-location=file -q -o mm-test25.tmp mm-test25.in1 mm-test25.in2 \ 40 || Exit 1 41LC_ALL=C tr -d '\r' < mm-test25.tmp > mm-test25.out || Exit 1 42 43cat << EOF > mm-test25.ok 44# first 45#. this is the first 46#: snark.c 47msgid "1" 48msgstr "1x" 49 50# second 51#. this is the second 52#: hunt.c 53msgid "2" 54msgstr "" 55"this is a really long msgstr used to test the wrapping to make sure it works " 56"after all what is a test for if not to test things?" 57 58# third 59#. this is the third 60#: boojum.c 61msgid "3" 62msgstr "3z" 63EOF 64 65: ${DIFF=diff} 66${DIFF} mm-test25.ok mm-test25.out 67result=$? 68 69exit $result 70