Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msggrep-6
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --msgid and --msgstr options with Java .properties syntax.
5
6 cat <<\EOF > mg-test6.properties
7 #: argmatch.c:141
8 #, c-format
9 invalid\ argument\ `%s'\ for\ `%s'=ung\u00fcltiges Argument \u00bb%s\u00ab f\u00fcr \u00bb%s\u00ab
10
11 #: argmatch.c:142
12 #, c-format
13 ambiguous\ argument\ `%s'\ for\ `%s'=mehrdeutiges Argument \u00bb%s\u00ab f\u00fcr \u00bb%s\u00ab
14
15 #: argmatch.c:162
16 Valid\ arguments\ are\:=G\u00fcltige Argumente sind\:
17
18 #: copy-file.c:60
19 #, c-format
20 error\ while\ opening\ "%s"\ for\ reading=\u00d6ffnen der Datei \u00bb%s\u00ab zum Lesen fehlgeschlagen
21
22 #: copy-file.c:67
23 #, c-format
24 cannot\ open\ backup\ file\ "%s"\ for\ writing=\u00d6ffnen der Sicherungsdatei \u00bb%s\u00ab zum Schreiben fehlgeschlagen
25
26 #: copy-file.c:80
27 #, c-format
28 error\ reading\ "%s"=Fehler beim Lesen von \u00bb%s\u00ab
29
30 #: copy-file.c:86 copy-file.c:90
31 #, c-format
32 error\ writing\ "%s"=Fehler beim Schreiben von \u00bb%s\u00ab
33
34 #: copy-file.c:92
35 #, c-format
36 error\ after\ reading\ "%s"=Fehler nach dem Lesen von \u00bb%s\u00ab
37
38 #: error.c:115
39 Unknown\ system\ error=Unbekannter Systemfehler
40
41 #: execute.c:170 execute.c:205 pipe-bidi.c:156 pipe-bidi.c:191 pipe-in.c:169
42 #: pipe-in.c:205 pipe-out.c:169 pipe-out.c:205 wait-process.c:136
43 #, c-format
44 %s\ subprocess\ failed=Subprozess %s fehlgeschlagen
45
46 #: getopt.c:691
47 #, c-format
48 %s\:\ option\ `%s'\ is\ ambiguous\n=%s\: Option \u00bb%s\u00ab ist mehrdeutig\n
49
50 #: getopt.c:716
51 #, c-format
52 %s\:\ option\ `--%s'\ doesn't\ allow\ an\ argument\n=%s\: Option \u00bb--%s\u00ab erwartet kein Argument\n
53
54 #: getopt.c:721
55 #, c-format
56 %s\:\ option\ `%c%s'\ doesn't\ allow\ an\ argument\n=%s\: Option \u00bb%c%s\u00ab erwartet kein Argument\n
57
58 #: getopt.c:739 getopt.c:912
59 #, c-format
60 %s\:\ option\ `%s'\ requires\ an\ argument\n=%s\: Option \u00bb%s\u00ab erwartet ein Argument\n
61
62 #: getopt.c:768
63 #, c-format
64 %s\:\ unrecognized\ option\ `--%s'\n=%s\: unbekannte Option \u00bb--%s\u00ab\n
65
66 #: getopt.c:772
67 #, c-format
68 %s\:\ unrecognized\ option\ `%c%s'\n=%s\: unbekannte Option \u00bb%c%s\u00ab\n
69
70 #: getopt.c:798
71 #, c-format
72 %s\:\ illegal\ option\ --\ %c\n=%s\: unzul\u00e4ssige Option -- %c\n
73
74 #: getopt.c:801
75 #, c-format
76 %s\:\ invalid\ option\ --\ %c\n=%s\: ung\u00fcltige Option -- %c\n
77
78 #: getopt.c:831 getopt.c:961
79 #, c-format
80 %s\:\ option\ requires\ an\ argument\ --\ %c\n=%s\: Option erwartet ein Argument -- %c\n
81
82 #: getopt.c:878
83 #, c-format
84 %s\:\ option\ `-W\ %s'\ is\ ambiguous\n=%s\: Option \u00bb-W %s\u00ab ist mehrdeutig\n
85
86 #: getopt.c:896
87 #, c-format
88 %s\:\ option\ `-W\ %s'\ doesn't\ allow\ an\ argument\n=%s\: Option \u00bb-W %s\u00ab erwartet kein Argument\n
89
90 #: javacomp.c:465
91 Java\ compiler\ not\ found,\ try\ installing\ gcj\ or\ set\ $JAVAC=Java-Compiler nicht gefunden; bitte \u00bbgcj\u00ab installieren oder $JAVAC setzen
92
93 #: javaexec.c:404
94 Java\ virtual\ machine\ not\ found,\ try\ installing\ gij\ or\ set\ $JAVA=Virtuelle Java-Maschine nicht gefunden; bitte \u00bbgcj\u00ab installieren oder\n$JAVA setzen
95
96 #: obstack.c:474 xerror.c:75 xmalloc.c:56
97 memory\ exhausted=virtueller Speicher ersch\u00f6pft
98
99 #: pipe-bidi.c:119 pipe-bidi.c:121 pipe-in.c:136 pipe-out.c:136
100 cannot\ create\ pipe=Es ist nicht m\u00f6glich, eine Pipe zu erzeugen
101
102 #: wait-process.c:117
103 #, c-format
104 %s\ subprocess=Subprozess %s
105
106 #: wait-process.c:129
107 #, c-format
108 %s\ subprocess\ got\ fatal\ signal=Subprozess %s hat ein fatales Signal erhalten
109
110 # A pattern specified for the msgid only must not be matched with the msgstr.
111 GSG-9=Antiterror-Einheit
112 EOF
113
114 : ${MSGGREP=msggrep}
115 LC_MESSAGES=C LC_ALL= \
116 ${MSGGREP} --properties-input --properties-output -K -e error -T -e Speicher -o mg-test6.tmp mg-test6.properties
117 result=$?
118 test $result = 0 || { exit 1; }
119 LC_ALL=C tr -d '\r' < mg-test6.tmp > mg-test6.out || exit 1
120
121 cat <<\EOF > mg-test6.ok
122 #: copy-file.c:60
123 #, c-format
124 error\ while\ opening\ "%s"\ for\ reading=\u00d6ffnen der Datei \u00bb%s\u00ab zum Lesen fehlgeschlagen
125
126 #: copy-file.c:80
127 #, c-format
128 error\ reading\ "%s"=Fehler beim Lesen von \u00bb%s\u00ab
129
130 #: copy-file.c:86 copy-file.c:90
131 #, c-format
132 error\ writing\ "%s"=Fehler beim Schreiben von \u00bb%s\u00ab
133
134 #: copy-file.c:92
135 #, c-format
136 error\ after\ reading\ "%s"=Fehler nach dem Lesen von \u00bb%s\u00ab
137
138 #: error.c:115
139 Unknown\ system\ error=Unbekannter Systemfehler
140
141 #: obstack.c:474 xerror.c:75 xmalloc.c:56
142 memory\ exhausted=virtueller Speicher ersch\u00f6pft
143 EOF
144
145 : ${DIFF=diff}
146 ${DIFF} mg-test6.ok mg-test6.out
147 result=$?
148
149 exit $result