1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test the gettext program with -e option. 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 # Create binary test file in correct position. 9 1.1 christos tmpfiles="$tmpfiles LC_MESSAGES" 10 1.1 christos test -d LC_MESSAGES || mkdir LC_MESSAGES 11 1.1 christos cp $top_srcdir/tests/test.mo LC_MESSAGES 12 1.1 christos 13 1.1 christos tmpfiles="$tmpfiles gt-test1.out" 14 1.1 christos : ${GETTEXT=gettext} 15 1.1 christos TEXTDOMAINDIR=.. LANGUAGE=tests \ 16 1.1 christos ${GETTEXT} --env LC_ALL=en -e test 'SYS_(C)\n' > gt-test1.out 17 1.1 christos 18 1.1 christos # Create correct file. 19 1.1 christos tmpfile="$tmpfiles gtmf-test1.ok" 20 1.1 christos cat <<EOF > gtmf-test1.ok 21 1.1 christos MSGFMT(1) portable message object file compiler 22 1.1 christos Copyright (C) 1995 Free Software Foundation 23 1.1 christos Report bugs to <bug-gnu-utils@gnu.org> 24 1.1 christos EOF 25 1.1 christos 26 1.1 christos : ${DIFF=diff} 27 1.1 christos ${DIFF} gtmf-test1.ok gt-test1.out 28 1.1 christos result=$? 29 1.1 christos 30 1.1 christos rm -fr $tmpfiles 31 1.1 christos 32 1.1 christos exit $result 33