Added meta data for Schreibgebrauch and fixed Metadata parsing for I5
Change-Id: Ib2c9c5cce11c67bb093b2c0aa61449adff69e16e
diff --git a/t/index/primary.t b/t/index/primary.t
new file mode 100644
index 0000000..7abf629
--- /dev/null
+++ b/t/index/primary.t
@@ -0,0 +1,31 @@
+#!/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__