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