blob: 552f98335441fd2e454ed9e674172fcf6bc86338 [file] [log] [blame]
Akron797e8072020-02-13 07:59:40 +01001use strict;
2use warnings;
3use File::Basename 'dirname';
4use File::Spec::Functions qw/catfile/;
Peter Harders1c5ce152020-07-22 18:02:50 +02005use Encode qw!encode_utf8 decode_utf8 encode!;
Akron797e8072020-02-13 07:59:40 +01006
7use Test::More;
8use Test::Output;
Peter Harders42e18a62020-07-21 02:43:26 +02009
10use FindBin;
11BEGIN {
12 unshift @INC, "$FindBin::Bin/../lib";
13};
Peter Harders1c5ce152020-07-22 18:02:50 +020014
Akron044bd922020-07-30 09:12:28 +020015use Test::KorAP::XML::TEI qw!korap_tempfile i5_template test_tei2korapxml!;
Peter Harders57c884e2020-07-16 01:28:52 +020016
Akron797e8072020-02-13 07:59:40 +010017my $f = dirname(__FILE__);
18my $script = catfile($f, '..', 'script', 'tei2korapxml');
19ok(-f $script, 'Script found');
20
Akrond949e182020-02-14 12:23:57 +010021stdout_like(
Akron797e8072020-02-13 07:59:40 +010022 sub { system('perl', $script, '--help') },
Akrond949e182020-02-14 12:23:57 +010023 qr!This\s*program\s*is\s*usually\s*called\s*from\s*inside\s*another\s*script\.!,
Akron797e8072020-02-13 07:59:40 +010024 'Help'
25);
26
Akron044bd922020-07-30 09:12:28 +020027
Akrond949e182020-02-14 12:23:57 +010028stdout_like(
29 sub { system('perl', $script, '--version') },
30 qr!tei2korapxml - v\d+?\.\d+?!,
31 'Version'
32);
33
Akron2a60c532020-02-13 15:52:18 +010034# Load example file
35my $file = catfile($f, 'data', 'goe_sample.i5.xml');
Peter Harders57c884e2020-07-16 01:28:52 +020036
Akron044bd922020-07-30 09:12:28 +020037subtest 'Basic processing' => sub {
Akron2a60c532020-02-13 15:52:18 +010038
Akron044bd922020-07-30 09:12:28 +020039 my $t = test_tei2korapxml(
40 tmp => 'script_out',
41 file => $file,
42 param => '-ti'
43 )->stderr_like(qr!tei2korapxml: .*? text_id=GOE_AGA\.00000!);
Akron2a60c532020-02-13 15:52:18 +010044
Akron68966082020-02-13 15:52:18 +010045
Akron044bd922020-07-30 09:12:28 +020046 # Uncompress GOE/header.xml from zip file
47 $t->unzip_xml('GOE/header.xml')
Akron2a60c532020-02-13 15:52:18 +010048
Akron044bd922020-07-30 09:12:28 +020049 # TODO: check wrong encoding in header-files (compare with input document)!
50 ->text_is('korpusSigle', 'GOE', 'korpusSigle')
51 ->text_is('h\.title[type=main]', 'Goethes Werke', 'h.title')
52 ->text_is('h\.author', 'Goethe, Johann Wolfgang von', 'h.author')
53 ->text_is('pubDate[type=year]', '1982', 'pubDate');
Akron2a60c532020-02-13 15:52:18 +010054
Akron044bd922020-07-30 09:12:28 +020055 # Uncompress GOE/AGA/header.xml from zip file
56 $t->unzip_xml('GOE/AGA/header.xml')
57 ->text_is('dokumentSigle', 'GOE/AGA', 'dokumentSigle')
58 ->text_is('d\.title', 'Goethe: Autobiographische Schriften II, (1817-1825, 1832)', 'd.title')
59 ->text_is('creatDate', '1820-1822', 'creatDate');
Akron2a60c532020-02-13 15:52:18 +010060
Akron044bd922020-07-30 09:12:28 +020061 # Uncompress GOE/AGA/00000/header.xml from zip file
62 $t->unzip_xml('GOE/AGA/00000/header.xml')
63 ->text_is('textSigle', 'GOE/AGA.00000', 'textSigle')
64 ->text_is('analytic > h\.title[type=main]', 'Campagne in Frankreich', 'h.title');
Akron2a60c532020-02-13 15:52:18 +010065
66# Uncompress GOE/AGA/00000/data.xml from zip file
Akron044bd922020-07-30 09:12:28 +020067 $t->unzip_xml('GOE/AGA/00000/data.xml')
68 ->attr_is('raw_text', 'docid', 'GOE_AGA.00000', 'text id')
Akronc57625b2020-07-30 11:46:06 +020069 ->text_like('raw_text > text', qr!^Campagne in Frankreich 1792.*?uns allein begl.*cke\.$!, 'text content');
Akron2a60c532020-02-13 15:52:18 +010070
Akron044bd922020-07-30 09:12:28 +020071 $t->unzip_xml('GOE/AGA/00000/struct/structure.xml')
Akronc57625b2020-07-30 11:46:06 +020072 ->text_is('span[id=s3] *[name=type]', 'Autobiographie', 'text content')
73 ->text_is('#s3 *[name=type]', 'Autobiographie', 'text content')
74 ->attr_is('#s0','to','1266')
75 ->attr_is('#s0','l','1')
76
77 ->attr_is('#s18','from','925')
78 ->attr_is('#s18','to','1266')
79 ->attr_is('#s18','l','5')
80 ->attr_is('#s18 > fs','type', 'struct')
81 ->attr_is('#s18 > fs > f','name','name')
82 ->text_is('#s18 > fs > f','poem')
83
84 ->attr_is('#s19','from','925')
85 ->attr_is('#s19','to','1098')
86 ->attr_is('#s19','l','6')
87 ->attr_is('#s19 > fs','type','struct')
88 ->text_is('#s19 > fs > f[name=name]','lg')
89 ->text_is('#s19 > fs > f[name=attr] > fs[type=attr] >f[name=part]','u')
90
91 ->attr_is('#s37','from','1229')
92 ->attr_is('#s37','to','1266')
93 ->attr_is('#s37','l','8')
94 ->attr_is('#s37 > fs','type','struct')
95 ->text_is('#s37 > fs > f[name=name]','s')
96 ->text_is('#s37 > fs > f[name=attr] > fs[type=attr] > f[name=type]','manual')
97
98 ->attr_is('#s38','from','1266')
99 ->attr_is('#s38','to','1266')
100 ->attr_is('#s38','l','2')
101 ->attr_is('#s38 > fs','type','struct')
102 ->text_is('#s38 > fs > f[name=name]','back')
103 ->element_count_is('', 196);
Akron2a60c532020-02-13 15:52:18 +0100104
Akron044bd922020-07-30 09:12:28 +0200105 $t->file_exists_not('GOE/AGA/00000/base/tokens.xml', 'External not generated');
Akron2a60c532020-02-13 15:52:18 +0100106
Akron044bd922020-07-30 09:12:28 +0200107 # Uncompress GOE/AGA/00000/base/tokens_aggressive.xml from zip file
108 $t->unzip_xml('GOE/AGA/00000/base/tokens_aggressive.xml')
109 ->attr_is('spanList span:nth-child(1)', 'to', 8)
110 ->attr_is('spanList span#t_1', 'from', 9)
111 ->attr_is('spanList span#t_1', 'to', 11)
Akron2a60c532020-02-13 15:52:18 +0100112
Akron044bd922020-07-30 09:12:28 +0200113 ->attr_is('spanList span#t_67', 'from', 427)
114 ->attr_is('spanList span#t_67', 'to', 430)
Akron2a60c532020-02-13 15:52:18 +0100115
Akron044bd922020-07-30 09:12:28 +0200116 ->attr_is('spanList span#t_214', 'from', 1209)
117 ->attr_is('spanList span#t_214', 'to', 1212)
Akron2a60c532020-02-13 15:52:18 +0100118
Akron044bd922020-07-30 09:12:28 +0200119 ->element_count_is('spanList span', 227);
Peter Harders57c884e2020-07-16 01:28:52 +0200120
Akron044bd922020-07-30 09:12:28 +0200121 # Uncompress GOE/AGA/00000/base/tokens_conservative.xml from zip file
122 $t->unzip_xml('GOE/AGA/00000/base/tokens_conservative.xml')
123 ->attr_is('spanList span:nth-child(1)', 'to', 8)
Akron2a60c532020-02-13 15:52:18 +0100124
Akron044bd922020-07-30 09:12:28 +0200125 ->attr_is('spanList span#t_1', 'from', 9)
126 ->attr_is('spanList span#t_1', 'to', 11)
Akron797e8072020-02-13 07:59:40 +0100127
Akron044bd922020-07-30 09:12:28 +0200128 ->attr_is('spanList span#t_67', 'from', 427)
129 ->attr_is('spanList span#t_67', 'to', 430)
Akroneac374d2020-07-07 09:00:44 +0200130
Akron044bd922020-07-30 09:12:28 +0200131 ->attr_is('spanList span#t_214', 'from', 1209)
132 ->attr_is('spanList span#t_214', 'to', 1212)
Akroneac374d2020-07-07 09:00:44 +0200133
Akron044bd922020-07-30 09:12:28 +0200134 ->element_count_is('spanList span', 227);
135};
Akroneac374d2020-07-07 09:00:44 +0200136
Akroneac374d2020-07-07 09:00:44 +0200137
Akron044bd922020-07-30 09:12:28 +0200138subtest 'Tokenize with external tokenizer' => sub {
Akroneac374d2020-07-07 09:00:44 +0200139
Akron044bd922020-07-30 09:12:28 +0200140 my $cmd = catfile($f, 'cmd', 'tokenizer.pl');
Akroneac374d2020-07-07 09:00:44 +0200141
Akron044bd922020-07-30 09:12:28 +0200142 test_tei2korapxml(
143 file => $file,
144 param => "-tc='perl $cmd'",
145 tmp => 'script_out2'
146 )
147 ->stderr_like(qr!tei2korapxml: .*? text_id=GOE_AGA\.00000!)
148 ->file_readable('GOE/AGA/00000/base/tokens.xml')
Akroneac374d2020-07-07 09:00:44 +0200149
Akron044bd922020-07-30 09:12:28 +0200150 # Uncompress GOE/AGA/00000/base/tokens.xml from zip file
151 ->unzip_xml('GOE/AGA/00000/base/tokens.xml')
152 ->attr_is('spanList span:nth-child(1)', 'to', 8)
153 ->attr_is('spanList span#t_1', 'from', 9)
154 ->attr_is('spanList span#t_1', 'to', 11)
155 ->attr_is('spanList span#t_67', 'from', 427)
156 ->attr_is('spanList span#t_67', 'to', 430)
157 ->attr_is('spanList span#t_214', 'from', 1209)
158 ->attr_is('spanList span#t_214', 'to', 1212)
159 ->element_count_is('spanList span', 227);
160};
Akroneac374d2020-07-07 09:00:44 +0200161
162
Akron044bd922020-07-30 09:12:28 +0200163subtest 'Test Tokenizations' => sub {
Akroneac374d2020-07-07 09:00:44 +0200164
Akron044bd922020-07-30 09:12:28 +0200165 my $t = test_tei2korapxml(
166 file => catfile($f, 'data', 'text_with_blanks.i5.xml'),
167 tmp => 'script_out3',
168 param => '-ti'
169 )->stderr_like(qr!tei2korapxml: .*? text_id=CORP_DOC.00001!);
Akron8b511f92020-07-09 17:28:08 +0200170
Akron044bd922020-07-30 09:12:28 +0200171 # ~ test conservative tokenization ~
172 $t->unzip_xml('CORP/DOC/00001/base/tokens_conservative.xml')
173 ->attr_is('spanList span:nth-child(1)', 'to', 6)
Akron8b511f92020-07-09 17:28:08 +0200174
Akron044bd922020-07-30 09:12:28 +0200175 ->attr_is('spanList span#t_1', 'from', 7)
176 ->attr_is('spanList span#t_1', 'to', 9)
Akron8b511f92020-07-09 17:28:08 +0200177
Akron044bd922020-07-30 09:12:28 +0200178 ->attr_is('spanList span#t_3', 'from', 12)
179 ->attr_is('spanList span#t_3', 'to', 16)
Akron8b511f92020-07-09 17:28:08 +0200180
Akron044bd922020-07-30 09:12:28 +0200181 ->attr_is('spanList span#t_9', 'from', 36)
182 ->attr_is('spanList span#t_9', 'to', 37)
Akron8b511f92020-07-09 17:28:08 +0200183
Akron044bd922020-07-30 09:12:28 +0200184 ->attr_is('spanList span#t_13', 'from', 44)
185 ->attr_is('spanList span#t_13', 'to', 45) # "
Akron8b511f92020-07-09 17:28:08 +0200186
Akron044bd922020-07-30 09:12:28 +0200187 ->attr_is('spanList span#t_14', 'from', 45) # twenty-two
188 ->attr_is('spanList span#t_14', 'to', 55)
Peter Harders42e18a62020-07-21 02:43:26 +0200189
Akron044bd922020-07-30 09:12:28 +0200190 ->attr_is('spanList span#t_15', 'from', 55) # "
191 ->attr_is('spanList span#t_15', 'to', 56)
Akron8b511f92020-07-09 17:28:08 +0200192
Akron044bd922020-07-30 09:12:28 +0200193 ->attr_is('spanList span#t_19', 'from', 66)
194 ->attr_is('spanList span#t_19', 'to', 67)
Peter Hardersb1227172020-07-21 02:12:10 +0200195
Akron044bd922020-07-30 09:12:28 +0200196 ->element_count_is('spanList span', 20);
Peter Harders71f072b2020-07-15 14:15:01 +0200197
Peter Harders71f072b2020-07-15 14:15:01 +0200198
Akron044bd922020-07-30 09:12:28 +0200199 # ~ test aggressive tokenization ~
200 $t->unzip_xml('CORP/DOC/00001/base/tokens_aggressive.xml')
201 ->attr_is('spanList span:nth-child(1)', 'to', 6)
Peter Harders71f072b2020-07-15 14:15:01 +0200202
Akron044bd922020-07-30 09:12:28 +0200203 ->attr_is('spanList span#t_1', 'from', 7)
204 ->attr_is('spanList span#t_1', 'to', 9)
Peter Harders71f072b2020-07-15 14:15:01 +0200205
Akron044bd922020-07-30 09:12:28 +0200206 ->attr_is('spanList span#t_3', 'from', 12)
207 ->attr_is('spanList span#t_3', 'to', 16)
Peter Harders71f072b2020-07-15 14:15:01 +0200208
Akron044bd922020-07-30 09:12:28 +0200209 ->attr_is('spanList span#t_9', 'from', 36)
210 ->attr_is('spanList span#t_9', 'to', 37)
Peter Harders71f072b2020-07-15 14:15:01 +0200211
Akron044bd922020-07-30 09:12:28 +0200212 ->attr_is('spanList span#t_13', 'from', 44)
213 ->attr_is('spanList span#t_13', 'to', 45) # "
Peter Harders71f072b2020-07-15 14:15:01 +0200214
Akron044bd922020-07-30 09:12:28 +0200215 ->attr_is('spanList span#t_14', 'from', 45) # twenty
216 ->attr_is('spanList span#t_14', 'to', 51)
Peter Harders71f072b2020-07-15 14:15:01 +0200217
Akron044bd922020-07-30 09:12:28 +0200218 ->attr_is('spanList span#t_15', 'from', 51) # -
219 ->attr_is('spanList span#t_15', 'to', 52)
Peter Harders71f072b2020-07-15 14:15:01 +0200220
Akron044bd922020-07-30 09:12:28 +0200221 ->attr_is('spanList span#t_16', 'from', 52) # two
222 ->attr_is('spanList span#t_16', 'to', 55)
Peter Harders71f072b2020-07-15 14:15:01 +0200223
Akron044bd922020-07-30 09:12:28 +0200224 ->attr_is('spanList span#t_17', 'from', 55) # "
225 ->attr_is('spanList span#t_17', 'to', 56)
Peter Harders71f072b2020-07-15 14:15:01 +0200226
Akron044bd922020-07-30 09:12:28 +0200227 ->attr_is('spanList span#t_21', 'from', 66)
228 ->attr_is('spanList span#t_21', 'to', 67)
Peter Harders71f072b2020-07-15 14:15:01 +0200229
Akron044bd922020-07-30 09:12:28 +0200230 ->element_count_is('spanList span', 22);
231};
Peter Harders71f072b2020-07-15 14:15:01 +0200232
233
Peter Harders42e18a62020-07-21 02:43:26 +0200234subtest 'Check Tokenization Flags' => sub {
235
236 # Get external tokenizer
237 my $f = dirname(__FILE__);
238 my $cmd = catfile($f, 'cmd', 'tokenizer.pl');
239
240 # Load example file
Akron044bd922020-07-30 09:12:28 +0200241 test_tei2korapxml(
242 file => catfile($f, 'data', 'goe_sample.i5.xml'),
243 param => "-ti -tc 'perl $cmd'",
244 tmp => 'script_tokflags'
245 )
246 ->stderr_like(qr!tei2korapxml: .*? text_id=GOE_AGA\.00000!)
247 ->file_exists('GOE/AGA/00000/base/tokens_aggressive.xml')
248 ->file_exists('GOE/AGA/00000/base/tokens_conservative.xml')
249 ->file_exists('GOE/AGA/00000/base/tokens.xml')
250 ;
Peter Harders42e18a62020-07-21 02:43:26 +0200251};
252
Peter Harders1c5ce152020-07-22 18:02:50 +0200253
254subtest 'Test utf-8 handling' => sub {
Peter Harders1c5ce152020-07-22 18:02:50 +0200255 # Introduce invalid utf-8 characters
256 my $text_sigle;
Akron54e363c2020-07-29 11:01:03 +0200257 {
258 no warnings;
259 # $text_sigle printed to file, without encoding: Aþƒ¿¿¿¿¿A_Bþƒ¿¿¿¿¿B.Cþƒ¿¿¿¿¿C
260 # the utf8-sequence 'þƒ¿¿¿¿¿' encodes 32 bit of data (see 0x7FFF_FFFF in perlunicode)
261 $text_sigle = "A\x{FFFF_FFFF}A_B\x{FFFF_FFFF}B.C\x{FFFF_FFFF}C"
262 }
263 # If CHECK is 0, encoding and decoding replace any malformed character
264 # with a substitution character.
Peter Harders1c5ce152020-07-22 18:02:50 +0200265 # � = substitution character
266 my $text_sigle_lax = encode_utf8($text_sigle);
267 my $text_sigle_esc = encode('UTF-8', $text_sigle);
268
269 is(length($text_sigle), 11); # A�A_B�B.C�C (char string => length(�) = 1)
270 is(length($text_sigle_lax), 29); # Aþƒ¿¿¿¿¿A_Bþƒ¿¿¿¿¿B.Cþƒ¿¿¿¿¿C (byte string)
271 is(length($text_sigle_esc), 17); # A�A_B�B.C�C (byte string => length(�) = 3)
272
Akron54e363c2020-07-29 11:01:03 +0200273
274 my $tpl;
275 {
276 no warnings;
277 $tpl = i5_template(
278 korpusSigle => "A\x{FFFF_FFFF}A",
279 dokumentSigle => "A\x{FFFF_FFFF}A_B\x{FFFF_FFFF}B",
280 text => "<p>d\x{FFFF_FFFF}d e\x{FFFF_FFFF}e f\x{FFFF_FFFF}f</p>",
281 textSigle => $text_sigle
282 );
283 };
Peter Harders1c5ce152020-07-22 18:02:50 +0200284
285 my ($fh, $tplfile) = korap_tempfile('script_out4');
286 binmode($fh);
287 print $fh encode_utf8($tpl); # => text_id=Aþƒ¿¿¿¿¿A_Bþƒ¿¿¿¿¿B.Cþƒ¿¿¿¿¿C
288 close($fh);
289
290 my (undef, $outzip) = korap_tempfile('script_out5');
291
Akron54e363c2020-07-29 11:01:03 +0200292 # because output 'textid=...' goes to STDERR (see script/tei2korapxml)
293 binmode STDERR, qw{ :encoding(UTF-8) };
Peter Harders1c5ce152020-07-22 18:02:50 +0200294
295 stderr_like(
296 sub { `cat '$tplfile' | perl '$script' -ti > '$outzip'` },
297 qr!tei2korapxml: .*? text_id=$text_sigle_lax!, # see above: print $fh encode_utf8($tpl);
298 );
299};
300
Akrone68ec0c2020-07-28 18:06:19 +0200301
302subtest 'Check Inline annotations' => sub {
303
304 # Load example file
305 my $file = catfile($f, 'data', 'goe_sample_tagged.i5.xml');
306
Akron044bd922020-07-30 09:12:28 +0200307 my $t = test_tei2korapxml(
308 file => $file,
309 env => 'KORAPXMLTEI_INLINE=1',
310 tmp => 'script_tagged'
311 )
312 ->stderr_like(qr!tei2korapxml: .*? text_id=GOE_AGA\.00000!)
Akrone68ec0c2020-07-28 18:06:19 +0200313
Akron044bd922020-07-30 09:12:28 +0200314 # Check zip using xml loy
315 ->unzip_xml('GOE/AGA/00000/tokens/morpho.xml')
Akrone68ec0c2020-07-28 18:06:19 +0200316
Akron044bd922020-07-30 09:12:28 +0200317 ->attr_is('layer', 'docid', 'GOE_AGA.00000')
Akrone68ec0c2020-07-28 18:06:19 +0200318 ->attr_is('spanList span:nth-child(1)', 'id', 's0')
319 ->attr_is('spanList span:nth-child(1)', 'from', '75')
320 ->attr_is('spanList span:nth-child(1)', 'to', '81')
321 ->attr_is('spanList span:nth-child(1)', 'l', '7')
322
323 ->attr_is('span#s0 > fs', 'type', 'lex')
324 ->attr_is('span#s0 > fs', 'xmlns', 'http://www.tei-c.org/ns/1.0')
325 ->attr_is('span#s0 > fs > f > fs > f:nth-child(1)', 'name', 'pos')
326 ->text_is('span#s0 > fs > f > fs > f:nth-child(1)', 'A')
327 ->attr_is('span#s0 > fs > f > fs > f:nth-child(2)', 'name', 'msd')
328 ->text_is('span#s0 > fs > f > fs > f:nth-child(2)', '@NH')
329
330 ->attr_is('span#s25', 'from', '259')
331 ->attr_is('span#s25', 'to', '263')
332 ->attr_is('span#s25', 'l', '7')
333 ->attr_is('span#s25 > fs > f > fs > f:nth-child(1)', 'name', 'pos')
334 ->text_is('span#s25 > fs > f > fs > f:nth-child(1)', 'PRON')
335 ->attr_is('span#s25 > fs > f > fs > f:nth-child(2)', 'name', 'msd')
336 ->text_is('span#s25 > fs > f > fs > f:nth-child(2)', '@NH')
337
338 ->attr_is('span#s58', 'from', '495')
339 ->attr_is('span#s58', 'to', '500')
340 ->attr_is('span#s58', 'l', '7')
341 ->attr_is('span#s58 > fs > f > fs > f:nth-child(1)', 'name', 'pos')
342 ->text_is('span#s58 > fs > f > fs > f:nth-child(1)', 'N')
343 ->attr_is('span#s58 > fs > f > fs > f:nth-child(2)', 'name', 'msd')
344 ->text_is('span#s58 > fs > f > fs > f:nth-child(2)', '@NH')
345
346 ->attr_is('span#s119', 'from', '914')
347 ->attr_is('span#s119', 'to', '925')
348 ->attr_is('span#s119', 'l', '7')
349 ->attr_is('span#s119 > fs > f > fs > f:nth-child(1)', 'name', 'pos')
350 ->text_is('span#s119 > fs > f > fs > f:nth-child(1)', 'A')
351 ->attr_is('span#s119 > fs > f > fs > f:nth-child(2)', 'name', 'msd')
352 ->text_is('span#s119 > fs > f > fs > f:nth-child(2)', '@NH')
353 ->element_exists_not('span#s120')
354 ;
355};
356
Akron09e0b2c2020-07-28 15:57:01 +0200357subtest 'Check Inline annotations with untagged file' => sub {
358
359 # Load example file
360 my $file = catfile($f, 'data', 'goe_sample.i5.xml');
361
362 my ($fh, $outzip) = korap_tempfile('script_untagged');
363
364 # Generate zip file (unportable!)
365 stderr_like(
366 sub { `cat '$file' | KORAPXMLTEI_INLINE=1 perl '$script' > '$outzip'` },
367 qr!tei2korapxml: .*? text_id=GOE_AGA\.00000!,
368 'Processing 1'
369 );
370
371 # TODO: there should be a better way to test this
372 stderr_unlike(
373 sub { `cat '$file' | KORAPXMLTEI_INLINE=1 perl '$script' > '$outzip'` },
374 qr!.*undefined value.*!,
375 'Processing 2'
376 );
377 #
378
379 ok(-e $outzip, "File $outzip exists");
380
381 my $zip = IO::Uncompress::Unzip->new(
382 $outzip,
383 Name => 'GOE/AGA/00000/tokens/morpho.xml'
384 );
385 ok((not $zip), 'missing morpho.xml');
386
387 $zip = IO::Uncompress::Unzip->new(
388 $outzip,
389 Name => 'GOE/AGA/00000/struct/structure.xml'
390 );
391 ok($zip, 'found structure.xml');
392};
Akrone68ec0c2020-07-28 18:06:19 +0200393
Akron797e8072020-02-13 07:59:40 +0100394done_testing;