Re: tests fail on windows with default git settings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: tests fail on windows with default git settings
Date
Msg-id 1204564.1720470925@sss.pgh.pa.us
Whole thread Raw
In response to Re: tests fail on windows with default git settings  (Andres Freund <andres@anarazel.de>)
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: 010_pg_basebackup.pl vs multiple filesystems
Next
From: Robert Haas
Date:
Subject: Re: 010_pg_basebackup.pl vs multiple filesystems