From: Yves Orton Date: Tue, 6 Sep 2022 10:07:25 +0000 (+0200) Subject: XS-APItest/t/locale.t - deal with indented values properly X-Git-Tag: v5.37.8~113 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/a99cfbcc697663aea3635b4d68624d2f0a0550f1 XS-APItest/t/locale.t - deal with indented values properly The old code used a regex that would split on exactly one space, so if the data was changed to have more than one then it would get absorbed into the name that was parsed out of the header file, leading the code to test for things like "FOO ", which of course don't exist. Likely this could have caused other issues too, but the defines in practice are single symbols. --- diff --git a/ext/XS-APItest/t/locale.t b/ext/XS-APItest/t/locale.t index 1a14fb4..b8eb09a 100644 --- a/ext/XS-APItest/t/locale.t +++ b/ext/XS-APItest/t/locale.t @@ -152,7 +152,7 @@ SKIP: { chomp; next unless / - \d+ $ /x; s/ ^ \# \s* define \s*//x; - m/ (.*) \ (.*) /x; + m/ (\S+) \s+ (.*) /x; $items{$1} = ($has_nl_langinfo) ? $1 # Yields 'YESSTR' : $2; # Yields -54