Akron | 14c7f67 | 2016-01-26 18:42:44 +0100 | [diff] [blame^] | 1 | use strict; |
| 2 | use warnings; |
| 3 | use Test::More; |
| 4 | use File::Basename 'dirname'; |
| 5 | use File::Spec::Functions 'catdir'; |
| 6 | use Data::Dumper; |
| 7 | use KorAP::Tokenizer; |
| 8 | use KorAP::Document; |
| 9 | use utf8; |
| 10 | |
| 11 | my $path = catdir(dirname(__FILE__), 'TEST', 'BSP', 1); |
| 12 | |
| 13 | ok(my $doc = KorAP::Document->new( |
| 14 | path => $path . '/' |
| 15 | ), 'Create Document'); |
| 16 | |
| 17 | ok($doc->parse, 'Parse document'); |
| 18 | |
| 19 | like($doc->path, qr!$path/!, 'Path'); |
| 20 | |
| 21 | # Metdata |
| 22 | is($doc->text_sigle, 'TEST_BSP.1', 'ID-text'); |
| 23 | is($doc->doc_sigle, 'TEST_BSP', 'ID-doc'); |
| 24 | is($doc->corpus_sigle, 'TEST', 'ID-corpus'); |
| 25 | |
| 26 | diag 'TODO: Parse meta'; |
| 27 | |
| 28 | done_testing; |