Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ilsg1-0002ln-7v for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Dec 2019 10:53:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ilsfy-0006FS-5B for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Dec 2019 10:53:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ilsfx-0006FK-Qe for pgsql-hackers@lists.postgresql.org; Mon, 30 Dec 2019 10:53:29 +0000 Received: from courriel.mines-paristech.fr ([77.158.173.149] helo=antispam-1.ensmp.fr) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ilsfv-00070u-7M for pgsql-hackers@lists.postgresql.org; Mon, 30 Dec 2019 10:53:29 +0000 Received: from smtp-4.mines-paristech.fr (smtp-4.ensmp.fr [77.158.173.143]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by antispam-1.ensmp.fr (antispam.mines-paristech.fr) with ESMTPS id 2AEAE576E3; Mon, 30 Dec 2019 11:49:29 +0100 (CET) Received: from pseudo (53.237.219.88.rev.sfr.net [88.219.237.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp-4.mines-paristech.fr (Postfix) with ESMTPSA id DD83F2C01F6; Mon, 30 Dec 2019 11:49:28 +0100 (CET) Date: Mon, 30 Dec 2019 11:49:28 +0100 (CET) From: Fabien COELHO X-X-Sender: fabien@pseudo To: Tom Lane cc: PostgreSQL Developers Subject: Re: TAP testing for psql's tab completion code In-Reply-To: <9761.1577647376@sss.pgh.pa.us> Message-ID: References: <10967.1577562752@sss.pgh.pa.us> <7904.1577573534@sss.pgh.pa.us> <28327.1577639622@sss.pgh.pa.us> <30270.1577641991@sss.pgh.pa.us> <9761.1577647376@sss.pgh.pa.us> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2056645051-706606332-1577702969=:14206" X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvdefhedgvddtucetufdoteggodetrfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffujgfkfhgfgggtsehmtderredtreejnecuhfhrohhmpefhrggsihgvnhcuvefqgffnjffquceotghovghlhhhosegtrhhirdgvnhhsmhhprdhfrheqnecukfhppeekkedrvdduledrvdefjedrheefnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2056645051-706606332-1577702969=:14206 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT >> That is what my patch does: it tests prompts, tab completion, help, >> command options… and I added tests till I covered most psql source. > > Well, I think that where possible we ought to test using the existing > test infrastructure -- help, for example, seems like it could perfectly > well be tested in src/test/regress/sql/psql.sql, or we could move stuff > out to a new set of SQL test scripts under src/bin/psql/sql/, I do not think it is a good idea, because help output is quite large, there are many of them, and we should certainly not want it stored repeatedly in output files for diffs. I rather trigger the output and only check for some related keywords, so that it fits TAP tests reasonably well. -- Fabien. --2056645051-706606332-1577702969=:14206--