1#! /bin/sh 2 3# Test a failing comparison. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles mc-test2.in1 mc-test2.in2" 9cat <<EOF > mc-test2.in1 10msgid "one" msgstr "first" 11msgid "two" msgstr "second" 12msgid "three" msgstr "third" 13msgid "four" msgstr "fourth" 14EOF 15 16cat <<EOF > mc-test2.in2 17msgid "thre" msgstr "" #i.e. pretend a typo in the program 18msgid "one" msgstr "" 19msgid "two" msgstr "" 20EOF 21 22tmpfiles="$tmpfiles mc-test2.out" 23: ${MSGCMP=msgcmp} 24LC_MESSAGES=C LC_ALL= \ 25${MSGCMP} mc-test2.in1 mc-test2.in2 2>&1 | grep -v '^==' | sed -e 's|[^ ]*\\msgcmp\.exe|msgcmp|' | tr -d '\r' > mc-test2.out 26 27tmpfiles="$tmpfiles mc-test2.ok" 28cat <<EOF > mc-test2.ok 29mc-test2.in2:1: this message is used but not defined... 30mc-test2.in1:3: ...but this definition is similar 31mc-test2.in1:4: warning: this message is not used 32msgcmp: found 1 fatal error 33EOF 34 35: ${DIFF=diff} 36${DIFF} mc-test2.ok mc-test2.out 37result=$? 38 39rm -fr $tmpfiles 40 41exit $result 42