Remove extract_text and extract_doc in favor of extract_sigle
Change-Id: I6577a8f453baab96e684da3b2238a31b4f0175e3
diff --git a/t/annotation/mdp_dependency.t b/t/annotation/mdp_dependency.t
index 1506d8b..de9144c 100644
--- a/t/annotation/mdp_dependency.t
+++ b/t/annotation/mdp_dependency.t
@@ -42,7 +42,7 @@
my $dir = tempdir();
my $f_path = 'WPD15/A00/00081';
-$archive->extract_text($f_path, $dir);
+$archive->extract_sigle([$f_path], $dir);
ok(my $doc = KorAP::XML::Krill->new( path => $dir . '/' . $f_path));
diff --git a/t/archive.t b/t/archive.t
index f86277f..71bedce 100644
--- a/t/archive.t
+++ b/t/archive.t
@@ -36,7 +36,7 @@
{
local $SIG{__WARN__} = sub {};
- ok($archive->extract_text('./TEST/BSP/8', $dir), 'Wrong path');
+ ok($archive->extract_sigle(['TEST/BSP/8'], $dir), 'Wrong path');
};
ok(-d catdir($dir, 'TEST'), 'Test corpus directory exists');
diff --git a/t/multiple_archives.t b/t/multiple_archives.t
index 1da4e9d..7e2a0e7 100644
--- a/t/multiple_archives.t
+++ b/t/multiple_archives.t
@@ -60,7 +60,7 @@
my $dir = tempdir(CLEANUP => 1);
{
local $SIG{__WARN__} = sub {};
- ok($archive->extract_text($list[0], $dir), 'Wrong path');
+ ok($archive->extract_sigle([$list[0]], $dir), 'Wrong path');
};
ok(-d catdir($dir, 'WPD15'), 'Test corpus directory exists');
diff --git a/t/script/extract.t b/t/script/extract.t
index 11d7cf3..084908b 100644
--- a/t/script/extract.t
+++ b/t/script/extract.t
@@ -51,14 +51,14 @@
'--cache' => $cache
);
-my $sep = qr!\.\.\.[\n\r]+?\.\.\.!;
+# my $sep = qr!\.\.\.[\n\r]+?\.\.\.!;
# Test without compression
stdout_like(
sub {
system($call);
},
- qr!TEST/BSP/1 $sep extracted!s,
+ qr!TEST/BSP/1 .* extracted!s,
# qr!TEST/BSP/1 $sep extracted.!s,
$call
);
@@ -91,7 +91,8 @@
sub {
system($call);
},
- qr!TEST/BSP/4 $sep extracted.!s,
+ # qr!TEST/BSP/4 $sep extracted.!s,
+ qr!TEST/BSP/4 .* extracted.!s,
$call
);
@@ -100,7 +101,8 @@
sub {
system($call);
},
- qr!TEST/BSP/5 $sep extracted.!s,
+ # qr!TEST/BSP/5 $sep extracted.!s,
+ qr!TEST/BSP/5 .* extracted.!s,
$call
);
@@ -110,7 +112,6 @@
ok(-d catdir($output2, 'TEST', 'BSP', '4'), 'Directory created');
ok(!-d catdir($output2, 'TEST', 'BSP', '5'), 'Directory created');
-
# Test with document sigle
my $input_rei = catdir($f, '..', 'corpus', 'archive_rei.zip');
ok(-f $input_rei, 'Input archive found');
@@ -147,7 +148,6 @@
ok(-d catdir($output2, 'REI', 'BNG', '00128'), 'Directory created');
ok(!-d catdir($output2, 'REI', 'RBR', '00610'), 'Directory not created');
-
# Test with document sigle
$output2 = undef;
$output2 = tempdir(CLEANUP => 1);
@@ -176,7 +176,7 @@
sub {
system($call);
},
- qr!REI/RBR $sep extracted!s,
+ qr!REI/RBR .* extracted!s,
$call
);
@@ -205,7 +205,7 @@
sub {
system($call);
},
- qr!WPD15/A00/00081 $sep extracted!s,
+ qr!WPD15/A00/00081 .* extracted!s,
$call
);
@@ -239,7 +239,8 @@
sub {
system($call);
},
- qr!TEST/BSP "Example"\/1 $sep extracted!s,
+ qr!TEST/BSP "Example"\/1 .* extracted!s,
+ # qr!TEST/BSP "Example"\/1 $sep extracted!s,
# qr!Extract .+? TEST/BSP "Example"\/1!s,
$call
);