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