File: t-basename-metachars.patch

package info (click to toggle)
libdancer2-perl 0.152000%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,820 kB
  • ctags: 536
  • sloc: perl: 8,034; sh: 51; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 1,078 bytes parent folder | download
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,