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.out"
32: ${MSGMERGE=msgmerge}
33${MSGMERGE} -q -C mm-c-2.com -o mm-c-2.out mm-c-2.in1 mm-c-2.pot
34test $? = 0 || { rm -fr $tmpfiles; exit 1; }
35
36tmpfiles="$tmpfiles mm-c-2.ok"
37cat << EOF > mm-c-2.ok
38#: file.c:123
39msgid "1"
40msgstr "1x"
41
42#: file.c:345
43#, fuzzy
44msgid "one, two, three..."
45msgstr "1, 2, 3"
46EOF
47
48: ${DIFF=diff}
49${DIFF} mm-c-2.ok mm-c-2.out
50result=$?
51
52rm -fr $tmpfiles
53
54exit $result
55