From 8bfee41e214b015fe6eb8ef0c185859f5b6401a7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 14 Aug 2010 05:18:31 +0200 Subject: Add remaining error classes, sort of --- t/60-bin-efa.t | 10 ++++------ t/out/ambiguous | 7 +------ t/out/invalid_input | 2 +- t/out/no_connections | 3 +-- 4 files changed, 7 insertions(+), 15 deletions(-) (limited to 't') diff --git a/t/60-bin-efa.t b/t/60-bin-efa.t index 8337b62..2b60233 100644 --- a/t/60-bin-efa.t +++ b/t/60-bin-efa.t @@ -3,7 +3,7 @@ use strict; use warnings; use 5.010; -use Test::Command tests => 85; +use Test::Command tests => 94; my $efa = 'bin/efa'; my $testarg = "E HBf MH HBf"; @@ -154,13 +154,11 @@ $cmd->exit_is_num(0); $cmd->stdout_is_file("t/out/e_hbf_mh_hbf.ignore_none"); $cmd->stderr_is_eq($EMPTY); -__END__ - $cmd = Test::Command->new( cmd => "$efa $test_parse < t/in/ambiguous" ); -$cmd->exit_is_num(1); +$cmd->exit_isnt_num(0); $cmd->stdout_is_eq($EMPTY); $cmd->stderr_is_file('t/out/ambiguous'); @@ -168,7 +166,7 @@ $cmd = Test::Command->new( cmd => "$efa $test_parse < t/in/no_connections" ); -$cmd->exit_is_num(2); +$cmd->exit_isnt_num(0); $cmd->stdout_is_eq($EMPTY); $cmd->stderr_is_file('t/out/no_connections'); @@ -176,6 +174,6 @@ $cmd = Test::Command->new( cmd => "$efa $test_parse < t/in/invalid_input" ); -$cmd->exit_is_num(3); +$cmd->exit_isnt_num(0); $cmd->stdout_is_eq($EMPTY); $cmd->stderr_is_file('t/out/invalid_input'); diff --git a/t/out/ambiguous b/t/out/ambiguous index 0dd2043..787b3fd 100644 --- a/t/out/ambiguous +++ b/t/out/ambiguous @@ -1,9 +1,4 @@ -Ambiguous input for name_origin +WWW::Efa error: ambiguous input for name_origin: Bredeney Bredeney Friedhof Bredeneyer Kreuz -Ambiguous input for name_destination - Werden Brücke - Werden S - Werdener Markt - Werdener Str. diff --git a/t/out/invalid_input b/t/out/invalid_input index 5686f5d..2d22895 100644 --- a/t/out/invalid_input +++ b/t/out/invalid_input @@ -1 +1 @@ -efa.vrr.de returned no connections, check your input data. +WWW::Efa error: No data returned by efa.vrr.de diff --git a/t/out/no_connections b/t/out/no_connections index f464ad3..f081ab7 100644 --- a/t/out/no_connections +++ b/t/out/no_connections @@ -1,5 +1,4 @@ -Looks like efa.vrr.de showed an error. -I will now try to dump the error message: +WWW::Efa error from efa.vrr.de: Leider konnte für Ihre Anfrage keine Verbindung gefunden werden! Bitte ändern Sie Ihre Eingabe (z.B. Fußwegezeit in den Mobilitätseinstellungen) oder starten Sie eine neue Anfrage! -- cgit v1.2.3