Home | History | Annotate | Line # | Download | only in tests
      1  1.1  christos #! /bin/sh
      2  1.1  christos 
      3  1.1  christos # Test --more-than=0 option 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 mcomm-test24.in1 mcomm-test24.in2"
      9  1.1  christos cat <<EOF > mcomm-test24.in1
     10  1.1  christos #: first.c:123
     11  1.1  christos 1=1x
     12  1.1  christos EOF
     13  1.1  christos 
     14  1.1  christos cat <<EOF > mcomm-test24.in2
     15  1.1  christos #: hunt.c:759
     16  1.1  christos 2=2x
     17  1.1  christos EOF
     18  1.1  christos 
     19  1.1  christos tmpfiles="$tmpfiles mcomm-test24.out"
     20  1.1  christos : ${MSGCOMM=msgcomm}
     21  1.1  christos ${MSGCOMM} --more-than=0 --properties-input --properties-output -o mcomm-test24.out mcomm-test24.in1 mcomm-test24.in2
     22  1.1  christos test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     23  1.1  christos 
     24  1.1  christos tmpfiles="$tmpfiles mcomm-test24.ok"
     25  1.1  christos cat << EOF > mcomm-test24.ok
     26  1.1  christos #: first.c:123
     27  1.1  christos 1=1x
     28  1.1  christos 
     29  1.1  christos #: hunt.c:759
     30  1.1  christos 2=2x
     31  1.1  christos EOF
     32  1.1  christos 
     33  1.1  christos : ${DIFF=diff}
     34  1.1  christos ${DIFF} mcomm-test24.ok mcomm-test24.out
     35  1.1  christos result=$?
     36  1.1  christos 
     37  1.1  christos rm -fr $tmpfiles
     38  1.1  christos 
     39  1.1  christos exit $result
     40