ports/devel/p5-Test-Unit/patches/patch-t_tlib_AssertTest_pm

24 lines
1.1 KiB
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Newer Perl prints regex modifiers differently.
Index: t/tlib/AssertTest.pm
--- t/tlib/AssertTest.pm.orig
+++ t/tlib/AssertTest.pm
@@ -70,7 +70,7 @@ sub test_assert {
'bang' => [ __LINE__, sub { shift->assert(0, 'bang') } ],
'bang' => [ __LINE__, sub { shift->assert('', 'bang') } ],
- "'qux' did not match /(?-xism:foo)/"
+ "'qux' did not match /(?^:foo)/"
=> [ __LINE__, sub { shift->assert(qr/foo/, 'qux') } ],
'bang' => [ __LINE__, sub { shift->assert(qr/foo/, 'qux', 'bang') } ],
'a ne b'=> [ __LINE__, sub { shift->assert($coderef, 'a', 'b') } ],
@@ -253,7 +253,7 @@ sub test_ok_not_equals {
q{expected '', got 'foo'} => [ 'foo', '' ],
q{expected 'foo', got ''} => [ '', 'foo' ],
q{expected 5, got 4} => [ $adder, 5 ],
- q{'foo' did not match /(?-xism:x)/} => [ 'foo', qr/x/ ],
+ q{'foo' did not match /(?^:x)/} => [ 'foo', qr/x/ ],
);
my @tests = ();
while (@checks) {