diff options
author | Håkon Hægland <hakon.hagland@gmail.com> | 2022-11-09 14:19:39 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-02-07 21:37:15 +0800 |
commit | c48bc75b4b72b05c98d37de9e34db008b02b0819 (patch) | |
tree | 394d912ea30ab6b209fa273676661dddfb7ba049 /lib | |
parent | dead3ccedb0e57c37846b3b30aa1d618ef1309f3 (diff) | |
download | perl-c48bc75b4b72b05c98d37de9e34db008b02b0819.tar.gz |
Don't test if PATHs are wrapped
This fixes issue #15544. If the user has PATH, or similar variables
containing a list of directories separated by e.g. a colon character
these can easily become lines with more than 1000 characters in a perlbug
report, resulting in a test failure in lib/perlbug.t.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/perlbug.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/perlbug.t b/lib/perlbug.t index 08c34d986d..b1f876e976 100644 --- a/lib/perlbug.t +++ b/lib/perlbug.t @@ -148,7 +148,12 @@ my $maxlen1 = 0; # body my $maxlen2 = 0; # attachment for (split(/\n/, $contents)) { my $len = length; - $maxlen1 = $len if $len > $maxlen1 and !/$B/; + # content lines setting path-like environment variables like PATH, PERLBREW_PATH, MANPATH,... + # will start "\s*xxxxPATH=" where "xxx" is zero or more non white space characters. These lines can + # easily get over 1000 characters (see ok-test below) with no internal spaces, so they + # will not get wrapped at white space. + # See also https://github.com/perl/perl5/issues/15544 for more information + $maxlen1 = $len if $len > $maxlen1 and !/(?:$B|^\s*\S*PATH=)/; $maxlen2 = $len if $len > $maxlen2 and /$B/; } ok($maxlen1 < 1000, "[perl #128020] long body lines are wrapped: maxlen $maxlen1"); |