perl/perl-5.24.0-Regression-test-for-RT-129196.patch

46 lines
1.2 KiB
Diff
Raw Normal View History

2016-11-03 08:16:29 +00:00
From a51d828a6d402f30f37707c714de218f6b47dbd8 Mon Sep 17 00:00:00 2001
From: Dan Collins <dcollinsn@gmail.com>
Date: Sun, 4 Sep 2016 14:43:41 -0400
Subject: [PATCH] Regression test for RT #129196
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Ported to 5.24.0:
commit a6128716d2cc20147851e0a37768376647bd3242
Author: Dan Collins <dcollinsn@gmail.com>
Date: Sun Sep 4 14:43:41 2016 -0400
Regression test for RT #129196
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
t/op/evalbytes.t | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/t/op/evalbytes.t b/t/op/evalbytes.t
index cca7c04..5e2af76 100644
--- a/t/op/evalbytes.t
+++ b/t/op/evalbytes.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl'; require './charset_tools.pl';
}
-plan(tests => 8);
+plan(tests => 9);
{
local $SIG{__WARN__} = sub {};
@@ -33,3 +33,7 @@ chop($upcode = "use utf8; $U_100" . chr 256);
is evalbytes $upcode, chr 256, 'use utf8 within evalbytes on utf8 string';
eval { evalbytes chr 256 };
like $@, qr/Wide character/, 'evalbytes croaks on non-bytes';
+
+eval 'evalbytes S';
+ok 1, '[RT #129196] evalbytes S should not segfault';
+
--
2.7.4