This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix Devel::Peek's tests when building with -DPERL_NO_COW
authorNicholas Clark <nick@ccl4.org>
Wed, 4 Sep 2013 12:55:00 +0000 (14:55 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 10 Sep 2013 08:48:23 +0000 (10:48 +0200)
One test had a pattern with a (?:...)? construction split across two lines,
specifically enclosing the newline at the end of a line, and the line that
followed.

When perl is built with -DPERL_NO_COW or -DPERL_OLD_COPY_ON_WRITE the test's
do_test() driver routine would remove the second line, which included the
closing ')?', leaving a an invalid regex. The solution is to remove the
(?: )? completely, as the driver routine's line removal has the same intent
as the (?: )? construction.

ext/Devel-Peek/t/Peek.t

index 7025b45..75f4a44 100644 (file)
@@ -1175,8 +1175,8 @@ unless ($Config{useithreads}) {
   FLAGS = \\(PADMY,POK,(?:IsCOW,)?pPOK\\)
   PV = $ADDR "good"\\\0
   CUR = 4
-  LEN = \d+(?:
-  COW_REFCNT = 1)?
+  LEN = \d+
+  COW_REFCNT = 1
 ');
 }