(Blind) fix Perl splitting of strings at newlines
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 16 Mar 2021 13:36:28 +0000 (10:36 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 16 Mar 2021 13:36:28 +0000 (10:36 -0300)
I forgot that Windows represents newlines as \r\n, so splitting a string
at /\s/ creates additional empty strings.  Let's rewrite that as /\s+/
to see if that avoids those.  (There's precedent for using that pattern
on Windows in other scripts.)

Previously: 91bdf499b37b8ed428dc977f650b96707672.

Per buildfarm, via Tom Lane.
Discussion: https://postgr.es/m/3144460.1615860259@sss.pgh.pa.us

src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl

index ba15b64ca73ea6eb5854c8ef650ba7ea1f4394a2..0213f21ee81e2daf9b1bd4e54d594385ab06b4bd 100644 (file)
@@ -16,7 +16,7 @@ $ENV{PATH} = "$ENV{PATH}:" . getcwd();
 
 my ($out, $err) = run_command(['libpq_pipeline', 'tests']);
 die "oops: $err" unless $err eq '';
-my @tests = split(/\s/, $out);
+my @tests = split(/\s+/, $out);
 
 for my $testname (@tests)
 {