Save the patch
This commit is contained in:
parent
57bff13261
commit
2aac65f26b
45
Test-Simple-0.98_05-Pass-regular-expression-intact.patch
Normal file
45
Test-Simple-0.98_05-Pass-regular-expression-intact.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 919f7398038fe24e7e23ffcff5c5abe1f00d13ce Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Fri, 9 Aug 2013 09:16:10 +0200
|
||||
Subject: [PATCH] Pass regular expression intact
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This commit:
|
||||
|
||||
commit 497965306444982d4948e24811e44e72619885f8
|
||||
Author: Michael G. Schwern <schwern@pobox.com>
|
||||
Date: Mon Apr 15 17:13:43 2013 +0100
|
||||
|
||||
Fix Test::Builder::Tester so it works with subtests.
|
||||
|
||||
broke test_err(qr//) because it converted the expression to a string.
|
||||
This patch omits regular expressions from indentation.
|
||||
|
||||
<https://github.com/schwern/test-more/issues/387>
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
lib/Test/Builder/Tester.pm | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/lib/Test/Builder/Tester.pm b/lib/Test/Builder/Tester.pm
|
||||
index 299ee52..fed11b5 100644
|
||||
--- a/lib/Test/Builder/Tester.pm
|
||||
+++ b/lib/Test/Builder/Tester.pm
|
||||
@@ -479,6 +479,11 @@ sub expect {
|
||||
sub _account_for_subtest {
|
||||
my( $self, $check ) = @_;
|
||||
|
||||
+ if (ref $check) {
|
||||
+ # Do not mangle regular expression
|
||||
+ return $check;
|
||||
+ }
|
||||
+
|
||||
# Since we ship with Test::Builder, calling a private method is safe...ish.
|
||||
return $t->_indent . $check;
|
||||
}
|
||||
--
|
||||
1.8.1.4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user