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