|  | #!/usr/bin/env perl | 
|  | use strict; | 
|  | use warnings; | 
|  | use utf8; | 
|  | use Test::More; | 
|  | use Scalar::Util qw/weaken/; | 
|  | use Data::Dumper; | 
|  | use lib 't/index'; | 
|  | use TestInit; | 
|  | use File::Basename 'dirname'; | 
|  | use File::Spec::Functions 'catdir'; | 
|  |  | 
|  |  | 
|  | my $path = catdir(dirname(__FILE__), 'corpus', 'doc', '0001'); | 
|  |  | 
|  | ok(my $doc = KorAP::Document->new( path => $path . '/' ), 'Load Korap::Document'); | 
|  | ok($doc->parse, 'Parse document'); | 
|  | like($doc->path, qr!$path/!, 'Path'); | 
|  |  | 
|  | is($doc->primary->data, | 
|  | 'Zum letzten kulturellen Anlass lädt die Leitung des Schulheimes Hofbergli ein, '. | 
|  | 'bevor der Betrieb Ende Schuljahr eingestellt wird.', 'Primary data'); | 
|  |  | 
|  | is($doc->primary->data_length, 129, 'Primary data length'); | 
|  |  | 
|  | is($doc->primary->data(0,3), 'Zum', 'Get primary data'); | 
|  |  | 
|  |  | 
|  | done_testing; | 
|  |  | 
|  | __END__ |