From 0c49e2bd3a1d51afd1be678e579451c929a42529 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 17 Jan 2014 11:23:26 +0100 Subject: add basic tests --- t/00-compile-pm.t | 8 + t/01-compile-pl.t | 8 + t/02-compile-pod.t | 8 + t/20-iris-class.t | 33 + t/in/fchg-8000098 | 1699 ------------------------------------------- t/in/fchg/8000098 | 1699 +++++++++++++++++++++++++++++++++++++++++++ t/in/plan-8000098-20 | 1 - t/in/plan-8000098-21 | 1 - t/in/plan-8000098-22 | 1 - t/in/plan-8000098-23 | 1 - t/in/plan/8000098/140103/20 | 1 + t/in/plan/8000098/140103/21 | 1 + t/in/plan/8000098/140103/22 | 1 + t/in/plan/8000098/140103/23 | 1 + t/in/station/EE | 3 + 15 files changed, 1763 insertions(+), 1703 deletions(-) create mode 100644 t/00-compile-pm.t create mode 100644 t/01-compile-pl.t create mode 100644 t/02-compile-pod.t create mode 100644 t/20-iris-class.t delete mode 100644 t/in/fchg-8000098 create mode 100644 t/in/fchg/8000098 delete mode 100644 t/in/plan-8000098-20 delete mode 100644 t/in/plan-8000098-21 delete mode 100644 t/in/plan-8000098-22 delete mode 100644 t/in/plan-8000098-23 create mode 100644 t/in/plan/8000098/140103/20 create mode 100644 t/in/plan/8000098/140103/21 create mode 100644 t/in/plan/8000098/140103/22 create mode 100644 t/in/plan/8000098/140103/23 create mode 100644 t/in/station/EE diff --git a/t/00-compile-pm.t b/t/00-compile-pm.t new file mode 100644 index 0000000..2476ab2 --- /dev/null +++ b/t/00-compile-pm.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use Test::More; +use Test::Compile; + +all_pm_files_ok(); diff --git a/t/01-compile-pl.t b/t/01-compile-pl.t new file mode 100644 index 0000000..f130ac4 --- /dev/null +++ b/t/01-compile-pl.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use Test::More; +use Test::Compile; + +all_pl_files_ok(); diff --git a/t/02-compile-pod.t b/t/02-compile-pod.t new file mode 100644 index 0000000..5fe4faa --- /dev/null +++ b/t/02-compile-pod.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use Test::More; +use Test::Pod; + +all_pod_files_ok(); diff --git a/t/20-iris-class.t b/t/20-iris-class.t new file mode 100644 index 0000000..0b33277 --- /dev/null +++ b/t/20-iris-class.t @@ -0,0 +1,33 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.014; + +use DateTime; +use Test::More tests => 274; + +BEGIN { + use_ok('Travel::Status::DE::IRIS'); +} +require_ok('Travel::Status::DE::IRIS'); + +my $status = Travel::Status::DE::IRIS->new( + iris_base => 'file:t/in', + station => 'EE', + datetime => DateTime->new( + year => 2014, month => 1, day => 3, hour => 20, minute => 1)); + +isa_ok($status, 'Travel::Status::DE::IRIS'); +can_ok($status, qw(errstr results)); + +for my $result ($status->results) { + isa_ok($result, 'Travel::Status::DE::IRIS::Result'); + can_ok($result, qw( + arrival classes date datetime delay departure is_cancelled line_no + platform raw_id realtime_xml route_start route_end sched_arrival + sched_departure sched_route_start sched_route_end start stop_no time + train_id train_no type unknown_t unknown_o + origin destination delay_messages qos_messages messages + info line route_pre route_post route train route_interesting + sched_route_pre sched_route_post sched_route TO_JSON)); +} diff --git a/t/in/fchg-8000098 b/t/in/fchg-8000098 deleted file mode 100644 index da38200..0000000 --- a/t/in/fchg-8000098 +++ /dev/null @@ -1,1699 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/t/in/fchg/8000098 b/t/in/fchg/8000098 new file mode 100644 index 0000000..da38200 --- /dev/null +++ b/t/in/fchg/8000098 @@ -0,0 +1,1699 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/t/in/plan-8000098-20 b/t/in/plan-8000098-20 deleted file mode 100644 index 92ab555..0000000 --- a/t/in/plan-8000098-20 +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/t/in/plan-8000098-21 b/t/in/plan-8000098-21 deleted file mode 100644 index f629697..0000000 --- a/t/in/plan-8000098-21 +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/t/in/plan-8000098-22 b/t/in/plan-8000098-22 deleted file mode 100644 index 7bd4b8d..0000000 --- a/t/in/plan-8000098-22 +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/t/in/plan-8000098-23 b/t/in/plan-8000098-23 deleted file mode 100644 index b7ccb8f..0000000 --- a/t/in/plan-8000098-23 +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/t/in/plan/8000098/140103/20 b/t/in/plan/8000098/140103/20 new file mode 100644 index 0000000..92ab555 --- /dev/null +++ b/t/in/plan/8000098/140103/20 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/t/in/plan/8000098/140103/21 b/t/in/plan/8000098/140103/21 new file mode 100644 index 0000000..f629697 --- /dev/null +++ b/t/in/plan/8000098/140103/21 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/t/in/plan/8000098/140103/22 b/t/in/plan/8000098/140103/22 new file mode 100644 index 0000000..7bd4b8d --- /dev/null +++ b/t/in/plan/8000098/140103/22 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/t/in/plan/8000098/140103/23 b/t/in/plan/8000098/140103/23 new file mode 100644 index 0000000..b7ccb8f --- /dev/null +++ b/t/in/plan/8000098/140103/23 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/t/in/station/EE b/t/in/station/EE new file mode 100644 index 0000000..a57a820 --- /dev/null +++ b/t/in/station/EE @@ -0,0 +1,3 @@ + + + -- cgit v1.2.3