Check for valid sigles to avoid broken directories
Change-Id: Ib4c9a125feda4ddb88966aff0fdbe1a39f00820f
diff --git a/t/header.t b/t/header.t
index 0012e75..4ee67e7 100644
--- a/t/header.t
+++ b/t/header.t
@@ -96,6 +96,24 @@
is($h->id_esc, 'GOE_"AAA"', 'Check sigle escaped');
is($h->dir, 'GOE/"AAA"', 'Check dir');
is($h->type, 'document', 'Check type');
+
+
+ ($fh, $filename) = korap_tempfile('header_2');
+
+ print $fh <<'HTML';
+ <fileDesc>
+ <titleStmt>
+ <dokumentSigle>ATZ10.</dokumentSigle>
+ </titleStmt>
+</idsHeader>
+Test
+HTML
+
+ seek($fh, 0, 0);
+
+ $h = KorAP::XML::TEI::Header->new('<idsHeader type="document">');
+ eval { $h->parse($fh) };
+ is($h->sigle, '', 'Check sigle');
};