Move get_file_from_glob() as a function to Krill.pm and test it

Change-Id: I16aea108f7df3190074c5f1113856c12c6480150
diff --git a/t/krill.t b/t/krill.t
new file mode 100644
index 0000000..d670171
--- /dev/null
+++ b/t/krill.t
@@ -0,0 +1,34 @@
+use strict;
+use warnings;
+use utf8;
+use Test::More;
+use lib 'lib', '../lib';
+
+use_ok('KorAP::XML::Krill', 'get_file_name_from_glob');
+
+is(
+  get_file_name_from_glob('versuch'),
+  'versuch'
+);
+
+is(
+  get_file_name_from_glob('versuch/alt\seltsam'),
+  'versuch-alt-seltsam'
+);
+
+is(
+  get_file_name_from_glob('versuch/*.xml'),
+  'versuch-.xml'
+);
+
+is(
+  get_file_name_from_glob('versuch//[a-z]{2,4}.xml'),
+  'versuch-a-z-2-4-.xml'
+);
+
+is(
+  get_file_name_from_glob('versuch//[a-z]{2,4}.zip'),
+  'versuch-a-z-2-4'
+);
+
+done_testing;