[Ludiafuncs-hackers] Add an expected file to follow the fix in PostgreSQL

Back to archive index
Fujii Masao masao****@gmail*****
2020年 2月 4日 (火) 11:22:01 JST


On Mon, Feb 3, 2020 at 8:15 PM torikoshia <torik****@oss*****> wrote:
>
> Hi,
>
> Current regression tests for textporter fail when tests
> are run in PostgreSQL 12 because of the slight difference
> (see attached file).
>
> When I changed the version of psql from 12 to 11, all
> tests were passed. And as far as using git-bisect,
> bellow commit for fixing the way of combining characters
> is the cause of this failure.
>
>
> https://github.com/postgres/postgres/commit/d8594d123c155aeecd47fc2450f62f5100b2fbf0
>
> At first I wondered why the fixed file was located in the
> "backend" directory, but frontends could also use this
> file as the comment says "can be used in either frontend
> or backend".
>
>
> Any way I think we should follow this fix.
>
> Reading the PostgreSQL manual, I've found a mechanism comparing
>   multiple expected files when there were expected files named
> "testname_digit.out".
> If one of these expected files is matched, the test is
> considered to pass.
>
>    https://www.postgresql.org/docs/12/regress-variant.html
>
> I'm considering adding 'textporter_1.out' to the expected
> directory and using this mechanism.
>
>
> Of couse It's better to make conditional branch depending
> on the PostgreQL version to do strict tests, but it may
>   be enough to use this mechanism. Any thought?

Thanks for working on this issue!

Your idea sounds good to me. The regression test SQL and expected
files are generated automatically from textporter.source file in
"input" and "output" directories. Can we use your approach based
on this mechanism automatically generating regression test files?

Regards,


-- 
Fujii Masao



Ludiafuncs-hackers メーリングリストの案内
Back to archive index