1#! /bin/sh 2 3# Test the gettext program without -e option. 4 5if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 6 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 7 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 8 ac_n= ac_c=' 9' ac_t=' ' 10 else 11 ac_n=-n ac_c= ac_t= 12 fi 13else 14 ac_n= ac_c='\c' ac_t= 15fi 16 17tmpfiles="" 18trap 'rm -fr $tmpfiles' 1 2 3 15 19 20# Create binary test file in correct position. 21tmpfiles="$tmpfiles LC_MESSAGES" 22test -d LC_MESSAGES || mkdir LC_MESSAGES 23cp $top_srcdir/tests/test.mo LC_MESSAGES 24 25tmpfiles="$tmpfiles gt-test2.out" 26: ${GETTEXT=gettext} 27TEXTDOMAINDIR=.. LANGUAGE=tests \ 28${GETTEXT} --env LC_ALL=en test 'error 3' > gt-test2.out 29 30# Create correct file. 31tmpfile="$tmpfiles gtmf-test2.ok" 32echo $ac_n "error 3 translation$ac_c" > gtmf-test2.ok 33 34: ${DIFF=diff} 35${DIFF} gtmf-test2.ok gt-test2.out 36result=$? 37 38rm -fr $tmpfiles 39 40exit $result 41