~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to gettext-tools/tests/msgmerge-3

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Test handling of obsolete/untranslated messages.
 
4
 
 
5
tmpfiles=""
 
6
trap 'rm -fr $tmpfiles' 1 2 3 15
 
7
 
 
8
tmpfiles="$tmpfiles mm-test3.in1 mm-test3.in2"
 
9
cat <<EOF > mm-test3.in1
 
10
#
 
11
# def.po
 
12
#
 
13
#: file:100
 
14
msgid ""
 
15
"not existing"
 
16
msgstr "but with translation"
 
17
 
 
18
#: file2:101
 
19
msgid "not existing without translation"
 
20
msgstr ""
 
21
 
 
22
#: file3:102
 
23
msgid "still existing"
 
24
msgstr "translation"
 
25
 
 
26
#: should-not-be-here:10
 
27
#~ msgid "former obsolete"
 
28
#~ msgstr ""
 
29
#~ "but again useful"
 
30
 
 
31
#~ msgid "this stays obsolete"
 
32
#~ msgstr "even after running msgmerge"
 
33
 
 
34
#
 
35
# trailing comments should be removed
 
36
EOF
 
37
 
 
38
cat <<EOF > mm-test3.in2
 
39
#
 
40
# ref.po
 
41
#
 
42
#: file3:102
 
43
msgid "still existing"
 
44
msgstr "here is normally no comment"
 
45
 
 
46
#: file4:10
 
47
msgid ""
 
48
"former obsolete"
 
49
msgstr ""
 
50
 
 
51
#
 
52
# trailing comments should be removed, even here
 
53
EOF
 
54
 
 
55
tmpfiles="$tmpfiles mm-test3.out"
 
56
: ${MSGMERGE=msgmerge}
 
57
${MSGMERGE} -q mm-test3.in1 mm-test3.in2 -o mm-test3.out
 
58
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
59
 
 
60
tmpfiles="$tmpfiles mm-test3.ok"
 
61
cat << EOF > mm-test3.ok
 
62
#: file3:102
 
63
msgid "still existing"
 
64
msgstr "translation"
 
65
 
 
66
#: file4:10
 
67
msgid "former obsolete"
 
68
msgstr "but again useful"
 
69
 
 
70
#
 
71
# def.po
 
72
#
 
73
#~ msgid "not existing"
 
74
#~ msgstr "but with translation"
 
75
 
 
76
#~ msgid "this stays obsolete"
 
77
#~ msgstr "even after running msgmerge"
 
78
EOF
 
79
 
 
80
: ${DIFF=diff}
 
81
${DIFF} mm-test3.ok mm-test3.out
 
82
result=$?
 
83
 
 
84
rm -fr $tmpfiles
 
85
 
 
86
exit $result