Treat prefixes correct for text sigles
Change-Id: I710912f4681f16d866410ead0e050afe55c61b68
diff --git a/t/archive.t b/t/archive.t
index 0a17165..1cd3c00 100644
--- a/t/archive.t
+++ b/t/archive.t
@@ -47,8 +47,10 @@
$archive = KorAP::XML::Archive->new($file);
ok(!$archive->check_prefix, 'Archive has no prefix');
-
-# TODO: Test attaching!
+# No leading '.'
+$file = catfile(dirname(__FILE__), 'corpus','archive_rei.zip');
+$archive = KorAP::XML::Archive->new($file);
+ok(!$archive->check_prefix, 'Archive has no dot prefix');
done_testing;
diff --git a/t/corpus/archive_quotes.zip b/t/corpus/archive_quotes.zip
new file mode 100644
index 0000000..2326b17
--- /dev/null
+++ b/t/corpus/archive_quotes.zip
Binary files differ
diff --git a/t/script/extract.t b/t/script/extract.t
index cc43bc8..884cdb5 100644
--- a/t/script/extract.t
+++ b/t/script/extract.t
@@ -215,5 +215,30 @@
ok(-f catfile($output, 'WPD15', 'A00', '00081', 'opennlp', 'morpho.xml'), 'New archive');
+# With quotes:
+# Test with document sigle
+my $input_quotes = catfile($f, '..', 'corpus', 'archive_quotes.zip');
+ok(-f $input, 'Input archive found');
+$output2 = undef;
+$output2 = tempdir(CLEANUP => 1);
+
+$call = join(
+ ' ',
+ 'perl', $script,
+ 'extract',
+ '--input' => $input_quotes,
+ '--output' => $output2,
+ '-sg' => '"TEST/BSP \"Example\"/1"'
+);
+
+# Test with sigle
+stdout_like(
+ sub {
+ system($call);
+ },
+ qr!TEST/BSP "Example"\/1 $sep extracted!s,
+ $call
+);
+
done_testing;
__END__