Re: tests fail on windows with default git settings
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@postgresql.org,
Dave Page <dpage@pgadmin.org>
Date: 2024-07-08T20:35:25Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > On 2024-07-07 06:30:57 -0400, Andrew Dunstan wrote: >> ISTM the right fix is probably to use PG_BINARY_R mode instead of "r" when >> opening the files, at least in the case if the test_json_parser tests. > That approach does seem to mildly conflict with Tom and your preference for > fixing this by disallowing core.autocrlf? If we do so, the test never ought to > see a crlf? Is this code that will *never* be applied to user-supplied files? We certainly should tolerate \r\n in the general case (we even have written-down project policy about that!). While I wouldn't complain too hard about assuming that our own test files don't contain \r\n, if the code might get copied into a non-test scenario then it could create problems later. regards, tom lane
Commits
-
Use diff --strip-trailing-cr in pg_regress.c
- 291c42074721 18.0 landed
-
Use diff's --strip-trailing-cr flag where appropriate on Windows
- 4506d18a9891 17.0 landed
- 628c1d1f2c82 18.0 landed