[libtest-bdd-cucumber-perl] 01/02: Upgrade parse error to use new system

Intrigeri intrigeri at moszumanska.debian.org
Thu Jun 19 10:18:54 UTC 2014


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to annotated tag 0.25
in repository libtest-bdd-cucumber-perl.

commit b4902b513da7d15806b0151dbe01ffde44f3c5ae
Author: Peter Sergeant <pete at clueball.com>
Date:   Sat Jun 7 13:08:08 2014 +0100

    Upgrade parse error to use new system
---
 lib/Test/BDD/Cucumber/Executor.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/Test/BDD/Cucumber/Executor.pm b/lib/Test/BDD/Cucumber/Executor.pm
index 39ce16f..38c61ec 100644
--- a/lib/Test/BDD/Cucumber/Executor.pm
+++ b/lib/Test/BDD/Cucumber/Executor.pm
@@ -20,6 +20,7 @@ use Test::Builder;
 use Test::BDD::Cucumber::StepContext;
 use Test::BDD::Cucumber::Util;
 use Test::BDD::Cucumber::Model::Result;
+use Test::BDD::Cucumber::Errors qw/parse_error_from_line/;
 
 =head1 METHODS
 
@@ -228,7 +229,7 @@ sub execute_scenario {
         foreach my $step (@{ $outline->steps }) {
 
             # Multiply out any placeholders
-            my $text = $self->add_placeholders( $step->text, $dataset );
+            my $text = $self->add_placeholders( $step->text, $dataset, $step->line );
 
             # Set up a context
             my $context = Test::BDD::Cucumber::StepContext->new({
@@ -284,11 +285,11 @@ values in the hashref, returning a string.
 =cut
 
 sub add_placeholders {
-    my ( $self, $text, $dataset ) = @_;
+    my ( $self, $text, $dataset, $line ) = @_;
     my $quoted_text = Test::BDD::Cucumber::Util::bs_quote( $text );
     $quoted_text =~ s/(<([^>]+)>)/
         exists $dataset->{$2} ? $dataset->{$2} :
-            die "No mapping to placeholder $1 in: $text"
+            die parse_error_from_line( "No mapping to placeholder $1", $line )
     /eg;
     return Test::BDD::Cucumber::Util::bs_unquote( $quoted_text );
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtest-bdd-cucumber-perl.git



More information about the Pkg-perl-cvs-commits mailing list