Re: psql - improve test coverage from 41% to 88%
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-09-12T06:25:50Z
Lists: pgsql-hackers
Attachments
- psql-tap-4.patch (text/x-diff) patch
> On Wed, Sep 11, 2019 at 10:52:01PM +0200, Fabien COELHO wrote: >> AFAICR this is because the coverage was not the same:-) Some backslash >> commands just skip silently to the end of the line, so that intermediate >> \commands on the same line are not recognized/processed the same, so I moved >> everything on one line to avoid this. > > I see. So basically this tests for more code paths to ignore > backslash commands and it improves the coverage of \elif. Applied > after fixing two nits: > - Indentation was incorrect. > - Moved the \elif test closer to the existing one for the false > branch (you can grep #2 to find it). Ok. Rebased version added, with some minor changes to improve readability (comments, variables). -- Fabien.
Commits
-
Improve coverage of psql for backslash commands with \if and \elif
- aafe2762b152 13.0 landed
-
Fix comment in psql's describe.c
- 8a0deae8d9b6 13.0 landed