blob: 5f81e18ed9eb2acebbde91dd10c5d2343aabe484 [file] [log] [blame]
Akron1622dd92015-12-09 22:34:26 +01001#!/usr/bin/env perl
2use strict;
3use warnings;
4use utf8;
Akrondcbee642020-10-30 18:01:43 +01005use KorAP::XML::Annotation::Base::Paragraphs;
Akron1622dd92015-12-09 22:34:26 +01006use Test::More;
Akron151676d2016-03-14 20:12:14 +01007use lib 't/annotation';
Akron11ef51d2016-01-18 19:07:56 +01008use TestInit;
Akron1622dd92015-12-09 22:34:26 +01009use Scalar::Util qw/weaken/;
Akrond69836b2015-12-10 00:40:20 +010010use Data::Dumper;
Akron1622dd92015-12-09 22:34:26 +010011
Akron11ef51d2016-01-18 19:07:56 +010012ok(my $tokens = TestInit::tokens('0001'), 'Parse tokens');
Akron1622dd92015-12-09 22:34:26 +010013
14ok($tokens->add('Base', 'Paragraphs'), 'Add Structure');
15
Akrond69836b2015-12-10 00:40:20 +010016my $data = $tokens->to_data->{data};
17
18like($data->{foundries}, qr!base/paragraphs!, 'data');
19is($data->{stream}->[0]->[0], '-:base/paragraphs$<i>1', 'Number of paragraphs');
20is($data->{stream}->[0]->[1], '-:tokens$<i>18', 'Number of tokens');
Akrondec43122020-03-03 11:22:25 +010021is($data->{stream}->[0]->[2], '<>:base/s:t$<b>64<i>0<i>129<i>18<b>0', 'Text');
22is($data->{stream}->[0]->[3], '<>:base/s:p$<b>64<i>0<i>129<i>18<b>1', 'Paragraph');
Akronee443f92016-02-25 23:56:49 +010023is($data->{stream}->[0]->[4], '_0$<i>0<i>3', 'Position');
Akron1622dd92015-12-09 22:34:26 +010024
25done_testing;
26
27__END__