Akron | b1f7dcc | 2016-01-21 12:52:43 +0100 | [diff] [blame] | 1 | #!/usr/bin/env perl |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | use utf8; |
| 5 | use Test::More skip_all => 'Not yet implemented'; |
| 6 | use Scalar::Util qw/weaken/; |
| 7 | use Data::Dumper; |
Akron | 5c460e4 | 2016-03-14 20:12:14 +0100 | [diff] [blame^] | 8 | use lib 't/annotation'; |
Akron | b1f7dcc | 2016-01-21 12:52:43 +0100 | [diff] [blame] | 9 | use TestInit; |
| 10 | |
| 11 | ok(my $tokens = TestInit::tokens('0002'), 'Parse tokens'); |
| 12 | |
| 13 | ok($tokens->add('Malt', 'dependency'), 'Add Structure'); |
| 14 | |
| 15 | my $data = $tokens->to_data->{data}; |
| 16 | |
Akron | 627a80a | 2016-01-29 19:38:18 +0100 | [diff] [blame] | 17 | diag $data; |
| 18 | |
Akron | b1f7dcc | 2016-01-21 12:52:43 +0100 | [diff] [blame] | 19 | done_testing; |
| 20 | __END__ |
| 21 | |
| 22 | |
| 23 | like($data->{foundries}, qr!xip/sentences!, 'data'); |
| 24 | |
| 25 | is($data->{stream}->[0]->[1], '-:xip/sentences$<i>1', 'Number of paragraphs'); |
| 26 | is($data->{stream}->[0]->[0], '-:tokens$<i>18', 'Number of tokens'); |
| 27 | is($data->{stream}->[0]->[2], '<>:xip/s:s$<b>64<i>0<i>129<i>17<b>0', 'Text'); |
| 28 | is($data->{stream}->[0]->[3], '_0$<i>0<i>3', 'Position'); |
| 29 | is($data->{stream}->[-1]->[0], '_17$<i>124<i>128', 'Position'); |
| 30 | |