• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test a failing comparison with Java .properties syntax.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mc-test3.in1 mc-test3.in2"
9cat <<EOF > mc-test3.in1
10one=first
11two=second
12three=third
13four=fourth
14EOF
15
16cat <<EOF > mc-test3.in2
17!thre=
18!one=
19!two=
20EOF
21
22tmpfiles="$tmpfiles mc-test3.out"
23: ${MSGCMP=msgcmp}
24LC_MESSAGES=C LC_ALL= \
25${MSGCMP} --properties-input mc-test3.in1 mc-test3.in2 2>&1 | grep -v '^==' | sed -e 's|[^ ]*\\msgcmp\.exe|msgcmp|' | tr -d '\r' > mc-test3.out
26
27tmpfiles="$tmpfiles mc-test3.ok"
28cat <<EOF > mc-test3.ok
29mc-test3.in2:1: this message is used but not defined...
30mc-test3.in1:3: ...but this definition is similar
31mc-test3.in1:4: warning: this message is not used
32msgcmp: found 1 fatal error
33EOF
34
35: ${DIFF=diff}
36${DIFF} mc-test3.ok mc-test3.out
37result=$?
38
39rm -fr $tmpfiles
40
41exit $result
42