Subject: | [PATCH] t/disapproval.t matches filehandle rather than file content |
I don't know why PPR succeeds in matching a file handle,
but I'm fairly sure what test #2 in t/disapproval.t actually
ought to match is a string with perl code. See patch.
-Martin
Subject: | PPR-0.000014-MHASCH-01.patch |
diff -Nrup PPR-0.000014.orig/t/disapproval.t PPR-0.000014/t/disapproval.t
--- PPR-0.000014.orig/t/disapproval.t 2017-08-27 07:06:10.000000000 +0200
+++ PPR-0.000014/t/disapproval.t 2017-10-31 07:48:55.381921144 +0100
@@ -28,7 +28,7 @@ ಠ_ಠ'ಠ_ಠ';
open my $own_file, '<:encoding(utf8)', $0 or die $!;
my $own_code = do { local $/; readline($own_file); };
-ok $own_file =~ m{ \A (?&PerlOWS) (?&PerlStatement) (?&PerlOWS) \Z $PPR::GRAMMAR }xo
+ok $own_code =~ m{ ^ (?&PerlOWS) (?&PerlStatement) (?&PerlOWS) $ $PPR::GRAMMAR }xmo
=> 'Matched code with the look of disapproval!';