Home | History | Annotate | Line # | Download | only in tests
      1 #! /bin/sh
      2 
      3 # Test general operation with Java .properties syntax.
      4 
      5 tmpfiles=""
      6 trap 'rm -fr $tmpfiles' 1 2 3 15
      7 
      8 tmpfiles="$tmpfiles men-test2.properties"
      9 cat <<\EOF > men-test2.properties
     10 !height\ must\ be\ positive=
     11 
     12 color\ cannot\ be\ transparent=colour cannot be transparent
     13 
     14 width\ must\ be\ positive=
     15 EOF
     16 
     17 tmpfiles="$tmpfiles men-test2.out"
     18 : ${MSGEN=msgen}
     19 ${MSGEN} --properties-input --properties-output -o men-test2.out men-test2.properties
     20 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     21 
     22 tmpfiles="$tmpfiles men-test2.ok"
     23 cat <<\EOF > men-test2.ok
     24 height\ must\ be\ positive=height must be positive
     25 
     26 color\ cannot\ be\ transparent=colour cannot be transparent
     27 
     28 width\ must\ be\ positive=width must be positive
     29 EOF
     30 
     31 : ${DIFF=diff}
     32 ${DIFF} men-test2.ok men-test2.out
     33 result=$?
     34 
     35 rm -fr $tmpfiles
     36 
     37 exit $result
     38