Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e08ac6

Browse files
committed
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 theSolaris buildfarm animals weren't running this test until they wereupgraded 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 of628c1d1 so thatthe test script looks about the same in all branches.
1 parentf8f9110 commit5e08ac6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
# Any diffs in the generated files will be accumulated here.
2727
my$diffs_file ="test.diffs";
2828

29+
# options used with diff (see pg_regress.c's pretty_diff_opts)
30+
my@diffopts = ("-U3");
31+
push(@diffopts,"--strip-trailing-cr")if$windows_os;
32+
2933
# Copy support files to current dir, so *.pro files don't need to know path.
3034
while (my$file =glob("$src_dir/tests/*.list"))
3135
{
@@ -45,7 +49,7 @@
4549
],
4650
"pg_bsd_indent succeeds on$test");
4751
# check result matches, adding any diff to $diffs_file
48-
my$result = run_log(['diff','-upd',"$test_src.stdout","$test.out" ],
52+
my$result = run_log(['diff',@diffopts,"$test_src.stdout","$test.out" ],
4953
'>>',$diffs_file);
5054
ok($result,"pg_bsd_indent output matches for$test");
5155
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp