1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test handling of header entry. 5 6cat <<EOF > mm-test5.in1.po 7# SOME DESCRIPTIVE TITLE. 8# Copyright (C) YEAR Free Software Foundation, Inc. 9# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 10# 11#, fuzzy 12msgid "" 13msgstr "" 14"Content-Transfer-Encoding: ENCODING\n" 15"MIME-Version: 1.0\n" 16"Test: bla bla\n" 17"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" 18"Language-Team: LANGUAGE <LL@li.org>\n" 19"Content-Type: text/plain; charset=CHARSET\n" 20"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 21"Project-Id-Version: PACKAGE VERSION\n" 22 23msgid "" 24"whatever, doesn't matter\n" 25msgstr "" 26"blah blah blah blah blah blah blah blah blah blah blah blah blah bla bla bla\n" 27EOF 28 29cat <<EOF > mm-test5.in2.po 30msgid "" 31msgstr "" 32 33msgid "" 34"whatever, doesn't matter\n" 35msgstr "" 36"blah blah blah blah blah blah blah blah blah blah blah blah blah bla bla bla\n" 37EOF 38 39: ${MSGMERGE=msgmerge} 40LC_MESSAGES=C LC_ALL= \ 41${MSGMERGE} -q -o mm-test5.tmp mm-test5.in1.po mm-test5.in2.po >mm-test5.err 2>&1 42result=$? 43cat mm-test5.err | grep -v 'warning: Charset' | grep -v '^ ' 44test $result = 0 || { Exit 1; } 45LC_ALL=C tr -d '\r' < mm-test5.tmp > mm-test5.out || Exit 1 46 47cat <<EOF > mm-test5.ok 48# SOME DESCRIPTIVE TITLE. 49# Copyright (C) YEAR Free Software Foundation, Inc. 50# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 51# 52#, fuzzy 53msgid "" 54msgstr "" 55"Project-Id-Version: PACKAGE VERSION\n" 56"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" 57"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 58"Language-Team: LANGUAGE <LL@li.org>\n" 59"Language: \n" 60"MIME-Version: 1.0\n" 61"Content-Type: text/plain; charset=CHARSET\n" 62"Content-Transfer-Encoding: ENCODING\n" 63"Test: bla bla\n" 64 65msgid "whatever, doesn't matter\n" 66msgstr "" 67"blah blah blah blah blah blah blah blah blah blah blah blah blah bla bla " 68"bla\n" 69EOF 70 71: ${DIFF=diff} 72${DIFF} mm-test5.ok mm-test5.out 73result=$? 74 75exit $result 76