[libtest-bdd-cucumber-perl] 45/52: Moved German examples to examples/

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


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

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

commit 19e9bdd92b5835043009c55ebd27bf1188e537d5
Author: Peter Sergeant <pete at Peters-MacBook-Air-2.local>
Date:   Sat May 31 17:04:18 2014 +0100

    Moved German examples to examples/
---
 {i18n/de => examples/i18n_de}/features/basic.feature             | 0
 .../i18n_de}/features/step_definitions/calculator_steps.pl       | 9 +++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/i18n/de/features/basic.feature b/examples/i18n_de/features/basic.feature
similarity index 100%
rename from i18n/de/features/basic.feature
rename to examples/i18n_de/features/basic.feature
diff --git a/i18n/de/features/step_definitions/calculator_steps.pl b/examples/i18n_de/features/step_definitions/calculator_steps.pl
similarity index 89%
rename from i18n/de/features/step_definitions/calculator_steps.pl
rename to examples/i18n_de/features/step_definitions/calculator_steps.pl
index 621b5a2..c1928a2 100644
--- a/i18n/de/features/step_definitions/calculator_steps.pl
+++ b/examples/i18n_de/features/step_definitions/calculator_steps.pl
@@ -2,6 +2,7 @@
 
 use strict;
 use warnings;
+use utf8; # Interpret funky German chars in regexes properly
 
 use Test::More;
 use Test::BDD::Cucumber::StepFile;
@@ -25,22 +26,22 @@ my %numbers_as_words = (
     __THE_NUMBER_TEN__  => 10,
 );
 
-sub map_word_to_number {
+sub map_word_to_number_i18n {
     my $word = shift;
 
     ok( $word );
     ok( exists $numbers_as_words{ $word } );
-    
+
     return $numbers_as_words{ $word };
 }
 
-Transform qr/^(__THE_NUMBER_\w+__)$/, sub { map_word_to_number( $1 ) };
+Transform qr/^(__THE_NUMBER_\w+__)$/, sub { map_word_to_number_i18n( $1 ) };
 
 Transform qr/^table:number as word$/, sub {
     my ($c, $data)=@_;
 
     for my $row ( @{ $data } ) {
-        $row->{'number'} = map_word_to_number( $row->{'number as word'} );
+        $row->{'number'} = map_word_to_number_i18n( $row->{'number as word'} );
     }
 };
 

-- 
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