Commit 82bef1e893 for perl
commit 82bef1e8932970f259f0688f6d00ba24c91a79f8
Author: Karl Williamson <khw@cpan.org>
Date: Thu Nov 5 11:33:38 2026 -0700
chop.t: Add todo test for failure to clear UTF-8 flag
diff --git a/t/op/chop.t b/t/op/chop.t
index f69a7ab7c8..467cd3333a 100644
--- a/t/op/chop.t
+++ b/t/op/chop.t
@@ -7,7 +7,7 @@ BEGIN {
require './charset_tools.pl';
}
-my $tests_count = 148;
+my $tests_count = 150;
plan tests => $tests_count;
$_ = 'abc';
@@ -303,3 +303,19 @@ $/ = "\n";
'lexical $b = chomp @a when $b eq $/ eq 0 and \$a[0] == \$b';
}
}
+
+TODO: {
+ local $::TODO = 'GH 25035';
+ for ("\x{100}", "\x{ff}") {
+ my $s = $_;
+ my $orig = $s;
+ my $c = chop $s;
+ my $testname = "chop() sets UTF-8 flag appropriately";
+ if (utf8::valid($c)) {
+ is($c, $orig, $testname);
+ }
+ else {
+ fail($testname);
+ }
+ }
+}