~ubuntu-branches/ubuntu/utopic/gettext/utopic

« back to all changes in this revision

Viewing changes to gettext-tools/tests/msgexec-2

  • Committer: Colin Watson
  • Date: 2010-08-01 21:36:08 UTC
  • mfrom: (2.1.10 sid)
  • Revision ID: cjwatson@canonical.com-20100801213608-yy7vkm8lpatep3ci
merge from Debian 0.18.1.1-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
tmpfiles=""
6
6
trap 'rm -fr $tmpfiles' 1 2 3 15
7
7
 
 
8
# Find a 'tr' program that supports NUL bytes in the input.
 
9
# Solaris /usr/bin/tr does not.
 
10
if test -f /usr/xpg6/bin/tr; then
 
11
  TR=/usr/xpg6/bin/tr
 
12
else
 
13
  if test -f /usr/xpg4/bin/tr; then
 
14
    TR=/usr/xpg4/bin/tr
 
15
  else
 
16
    TR=tr
 
17
  fi
 
18
fi
 
19
 
8
20
tmpfiles="$tmpfiles mex-test2.po"
9
21
cat <<\EOF > mex-test2.po
10
22
# HEADER.
57
69
#~ msgstr "das einen verheirateten Mann liebt"
58
70
EOF
59
71
 
60
 
tmpfiles="$tmpfiles mex-test2.out"
 
72
tmpfiles="$tmpfiles mex-test2.tmp mex-test2.out mex-test2.err"
61
73
: ${MSGEXEC=msgexec}
62
 
${MSGEXEC} -i mex-test2.po 0 > mex-test2.out
 
74
LC_ALL=C \
 
75
${MSGEXEC} -i mex-test2.po 0 > mex-test2.tmp 2> mex-test2.err
 
76
result=$?
 
77
cat mex-test2.err | grep -v 'warning: Locale charset' | grep -v '^ '
 
78
test $result = 0 || { rm -fr $tmpfiles; exit 1; }
 
79
LC_ALL=C $TR -d '\r' < mex-test2.tmp > mex-test2.out
63
80
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
64
81
 
65
82
: ${CMP=cmp}