1#! /bin/sh 2 3# Test of an external command with Java .properties syntax. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles mex-test3.properties" 9cat <<\EOF > mex-test3.properties 10# HEADER. 11# 12!=Project-Id-Version\: Bonnie Tyler\n 13 14#: married-men:4 15#, fuzzy 16!The\ world\ is\ full\ of\ married\ men=So viele verheiratete M\u00e4nner 17 18#: married-men:5 19with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht 20 21#: married-men:6 22!They're\ looking\ for\ someone\ to\ share= 23 24# schwer zu \u00fcbersetzen... 25#: married-men:7 26!the\ excitement\ of\ a\ love\ affair= 27 28#: married-men:8 29!Just\ as\ soon\ as\ they\ find\ you= 30 31#: married-men:9 32!They\ warn\ you\ and\ darn\ you= 33EOF 34 35tmpfiles="$tmpfiles mex-test3.sh" 36cat <<\EOF > mex-test3.sh 37#! /bin/sh 38echo "========================= $MSGEXEC_LOCATION =========================" 39cat <<MEOF 40$MSGEXEC_MSGID 41--- 42MEOF 43cat 44echo 45exit 0 46EOF 47chmod a+x mex-test3.sh 48 49tmpfiles="$tmpfiles mex-test3.out" 50: ${MSGEXEC=msgexec} 51${MSGEXEC} --properties-input -i mex-test3.properties ./mex-test3.sh > mex-test3.out 52test $? = 0 || { rm -fr $tmpfiles; exit 1; } 53 54tmpfiles="$tmpfiles mex-test3.ok" 55cat <<\EOF > mex-test3.ok 56========================= mex-test3.properties:3 ========================= 57 58--- 59Project-Id-Version: Bonnie Tyler 60 61========================= mex-test3.properties:7 ========================= 62The world is full of married men 63--- 64So viele verheiratete M��nner 65========================= mex-test3.properties:10 ========================= 66with wives who never understand 67--- 68und ihre Frauen verstehen sie nicht 69========================= mex-test3.properties:13 ========================= 70They're looking for someone to share 71--- 72 73========================= mex-test3.properties:17 ========================= 74the excitement of a love affair 75--- 76 77========================= mex-test3.properties:20 ========================= 78Just as soon as they find you 79--- 80 81========================= mex-test3.properties:23 ========================= 82They warn you and darn you 83--- 84 85EOF 86 87: ${DIFF=diff} 88${DIFF} mex-test3.ok mex-test3.out 89result=$? 90 91rm -fr $tmpfiles 92 93exit $result 94