• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test compendium option with fuzziness.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles mm-c-2.in1 mm-c-2.com mm-c-2.pot"
9cat <<EOF > mm-c-2.in1
10#: file.c:123
11msgid "1"
12msgstr "1x"
13EOF
14
15cat <<EOF > mm-c-2.com
16#: file.c:345
17msgid "one, two, three"
18msgstr "1, 2, 3"
19EOF
20
21cat <<EOF > mm-c-2.pot
22#: file.c:123
23msgid "1"
24msgstr ""
25
26#: file.c:345
27msgid "one, two, three..."
28msgstr ""
29EOF
30
31tmpfiles="$tmpfiles mm-c-2.tmp mm-c-2.out"
32: ${MSGMERGE=msgmerge}
33${MSGMERGE} -q -C mm-c-2.com -o mm-c-2.tmp mm-c-2.in1 mm-c-2.pot
34test $? = 0 || { rm -fr $tmpfiles; exit 1; }
35tr -d '\r' < mm-c-2.tmp > mm-c-2.out
36test $? = 0 || { rm -fr $tmpfiles; exit 1; }
37
38tmpfiles="$tmpfiles mm-c-2.ok"
39cat << EOF > mm-c-2.ok
40#: file.c:123
41msgid "1"
42msgstr "1x"
43
44#: file.c:345
45#, fuzzy
46msgid "one, two, three..."
47msgstr "1, 2, 3"
48EOF
49
50: ${DIFF=diff}
51${DIFF} mm-c-2.ok mm-c-2.out
52result=$?
53
54rm -fr $tmpfiles
55
56exit $result
57