1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
Description: fix (potential) test failure
t/classes/Dancer2-Core-Role-HasLocation/base.t fails if the build path
contains regex meta-characters (like '+' in my case).
Disable pattern metacharacters when removing $basedir.
Origin: vendor
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2014-10-15
Forwarded: https://github.com/PerlDancer/Dancer2/issues/727
Bug: https://github.com/PerlDancer/Dancer2/issues/727
--- a/t/classes/Dancer2-Core-Role-HasLocation/base.t
+++ b/t/classes/Dancer2-Core-Role-HasLocation/base.t
@@ -42,7 +42,7 @@
isa_ok( $app, 'App' );
my $location = $app->location;
- $location =~ s/$basedir//;
+ $location =~ s/\Q$basedir\E//;
is(
$location,
@@ -61,7 +61,7 @@
isa_ok( $app, 'App' );
my $location = $app->location;
- $location =~ s/$basedir//;
+ $location =~ s/\Q$basedir\E//;
is(
$location,
@@ -80,7 +80,7 @@
isa_ok( $app, 'App' );
my $location = $app->location;
- $location =~ s/$basedir//;
+ $location =~ s/\Q$basedir\E//;
is(
$location,
|