Ignore temporary-extraction on directory archiving

Change-Id: I4fb13c5b80f76d91837a3b9fa97eed6b9de162d6
diff --git a/t/script/archive.t b/t/script/archive.t
index db4f856..8d0fba1 100644
--- a/t/script/archive.t
+++ b/t/script/archive.t
@@ -9,7 +9,7 @@
 use Mojo::JSON qw/decode_json/;
 use IO::Uncompress::Gunzip;
 use Test::More;
-use Test::Output qw/:stdout :stderr :functions/;
+use Test::Output qw/:stdout :stderr :combined :functions/;
 use Data::Dumper;
 use KorAP::XML::Archive;
 use utf8;
@@ -44,7 +44,6 @@
 
 my $cache = tmpnam();
 
-
 ok(-d $output, 'Output directory exists');
 
 $call = join(
@@ -136,6 +135,31 @@
 ok(-d $output, 'Ouput directory exists');
 
 
+my $temp_extract = tmpnam();
+
+# Ignore -te when archive is a directory
+$call = join(
+  ' ',
+  'perl', $script,
+  'archive',
+  '--input' => $input,
+  '--output' => $output,
+  '--cache' => $cache,
+  '-t' => 'Tree_Tagger#Tokens',
+  '-j' => 4, # 4 jobs!
+  '-te' => $temp_extract
+);
+
+{
+  local $SIG{__WARN__} = sub {};
+
+  my $out = combined_from(sub { system($call); });
+
+  ok($out =~ m!Processed .+?\/corpus-doc-0001\.json!s, $call);
+  ok($out =~ m!Processed .+?\/corpus-doc-0002\.json!s, $call);
+};
+
+
 $input = catfile($f, '..', 'corpus', 'WDD15', 'A79', '83946');
 $call = join(
   ' ',