Loading lib/Travel/Status/DE/IRIS/Result.pm +3 −0 Original line number Diff line number Diff line Loading @@ -302,6 +302,9 @@ sub route_interesting { if ( @via_main and $via_main[-1] eq $last_stop ) { pop(@via_main); } if ( @via and $via[-1] eq $last_stop ) { pop(@via); } if ( @via_main and @via and $via[0] eq $via_main[0] ) { shift(@via_main); Loading t/33_result-route.t +5 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use 5.014; use utf8; use DateTime; use Test::More tests => 8; use Test::More tests => 10; use Test::Fatal; use Travel::Status::DE::IRIS; Loading Loading @@ -95,5 +95,9 @@ is_deeply( is_deeply([$ice645->route_interesting], ['Bochum', 'Dortmund', 'Bielefeld'], 'route_interesting with just major'); is_deeply([$s1->route_interesting], [], 'route_interesting with realtime'); is_deeply([$s9->route_interesting], [], 'route_interesting, train ends here'); is_deeply([$abr->route_interesting], ['Essen-Kray Süd', 'Bochum', 'Witten'], 'route_interesting with minor'); Loading
lib/Travel/Status/DE/IRIS/Result.pm +3 −0 Original line number Diff line number Diff line Loading @@ -302,6 +302,9 @@ sub route_interesting { if ( @via_main and $via_main[-1] eq $last_stop ) { pop(@via_main); } if ( @via and $via[-1] eq $last_stop ) { pop(@via); } if ( @via_main and @via and $via[0] eq $via_main[0] ) { shift(@via_main); Loading
t/33_result-route.t +5 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use 5.014; use utf8; use DateTime; use Test::More tests => 8; use Test::More tests => 10; use Test::Fatal; use Travel::Status::DE::IRIS; Loading Loading @@ -95,5 +95,9 @@ is_deeply( is_deeply([$ice645->route_interesting], ['Bochum', 'Dortmund', 'Bielefeld'], 'route_interesting with just major'); is_deeply([$s1->route_interesting], [], 'route_interesting with realtime'); is_deeply([$s9->route_interesting], [], 'route_interesting, train ends here'); is_deeply([$abr->route_interesting], ['Essen-Kray Süd', 'Bochum', 'Witten'], 'route_interesting with minor');