summaryrefslogtreecommitdiff
path: root/t/30-invalid-xml.t
diff options
context:
space:
mode:
Diffstat (limited to 't/30-invalid-xml.t')
-rwxr-xr-xt/30-invalid-xml.t21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/30-invalid-xml.t b/t/30-invalid-xml.t
new file mode 100755
index 0000000..cb83a4c
--- /dev/null
+++ b/t/30-invalid-xml.t
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.020;
+
+use utf8;
+
+use File::Slurp qw(read_file);
+use Test::More tests => 1;
+
+use Travel::Status::DE::HAFAS;
+
+my $xml = 'lol';
+
+my $status = Travel::Status::DE::HAFAS->new(
+ service => 'DB',
+ station => 'Berlin Jannowitzbrücke',
+ xml => $xml
+);
+
+is (scalar $status->results, 0, 'no results on invalid input');