Atomize and test comment stripping
Change-Id: Id798c8bac96214f29659b2764f8861539d6f5210
diff --git a/t/tei.t b/t/tei.t
new file mode 100644
index 0000000..292ed19
--- /dev/null
+++ b/t/tei.t
@@ -0,0 +1,30 @@
+use strict;
+use warnings;
+use Test::More;
+use File::Temp 'tempfile';
+
+use FindBin;
+BEGIN {
+ unshift @INC, "$FindBin::Bin/../lib";
+};
+
+require_ok('KorAP::XML::TEI');
+
+my ($fh, $filename) = tempfile();
+
+print $fh <<'HTML';
+mehrzeiliger
+Kommentar
+ -->
+Test
+HTML
+
+is(KorAP::XML::TEI::delHTMLcom($fh, "hallo"),"hallo");
+is(KorAP::XML::TEI::delHTMLcom($fh, "hallo <!-- Test -->"),"hallo ");
+is(KorAP::XML::TEI::delHTMLcom($fh, "<!-- Test --> hallo")," hallo");
+
+seek($fh, 0, 0);
+
+is(KorAP::XML::TEI::delHTMLcom($fh, '<!--'), "Test\n");
+
+done_testing;