From: Tom Lane Date: Mon, 4 Nov 2024 23:08:48 +0000 (-0500) Subject: Use portable diff options in pg_bsd_indent's regression test. X-Git-Tag: REL_18_BETA1~1540 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=0704aed0d851abe9ec297dbd009951f0feeb12aa;p=postgresql.git Use portable diff options in pg_bsd_indent's regression test. We had been using "diff -upd", which evidently works for most people, but Solaris's diff doesn't like it. (We'd not noticed because the Solaris buildfarm animals weren't running this test until they were upgraded to the latest buildfarm client script.) Change to "diff -U3" which is what pg_regress has used for ages. Per buildfarm (and off-list discussion with Noah Misch). Back-patch to v16 where this test was added. In v16, also back-patch the relevant part of 628c1d1f2 so that the test script looks about the same in all branches. --- diff --git a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl index 9e23ab96161..d23722a0e00 100644 --- a/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl +++ b/src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl @@ -26,8 +26,8 @@ program_version_ok('pg_bsd_indent'); # Any diffs in the generated files will be accumulated here. my $diffs_file = "test.diffs"; -# options used with diff -my @diffopts = ("-upd"); +# options used with diff (see pg_regress.c's pretty_diff_opts) +my @diffopts = ("-U3"); push(@diffopts, "--strip-trailing-cr") if $windows_os; # Copy support files to current dir, so *.pro files don't need to know path.