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 1ildgb-0001vv-EF for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2019 18:53:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ildgY-000771-Uy for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2019 18:53:06 +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 1ildgY-00076u-M0 for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2019 18:53:06 +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 1ildgW-0007NU-4P for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2019 18:53:05 +0000 Received: from smtp-5.mines-paristech.fr (smtp.mines-paristech.fr [77.158.173.146]) (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 CC518561A2; Sun, 29 Dec 2019 19:52:43 +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-5.mines-paristech.fr (Postfix) with ESMTPSA id 6A0B920143; Sun, 29 Dec 2019 19:52:43 +0100 (CET) Date: Sun, 29 Dec 2019 19:52:41 +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: <30270.1577641991@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> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2056645051-225244493-1577645563=:14206" X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvdeffedguddukecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvufgjkfhffgggtgesmhdtreertderjeenucfhrhhomhephfgrsghivghnucevqffgnffjqfcuoegtohgvlhhhohestghrihdrvghnshhmphdrfhhrqeenucfkphepkeekrddvudelrddvfeejrdehfeenucfrrghrrghmpehmohguvgepshhmthhpohhuth 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-225244493-1577645563=:14206 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT >> I'm not fan of relying on the configure stuff ("with_readline"), in my >> Expect version I tested if history capabilities are available from psql >> itself. > > No, I disagree with that. If configure thinks it built with readline, > and then the actual binary acts like it doesn't have readline, that's > a bug that we'd like the tests to detect. Hmmm. Sure, that's a point. What about running some tests on an installed version? >> For the psql coverage patch, I was more ambitious and needed less >> assumption about the configuration, I only forced -X. > > I mainly just duplicated the environment set up by PostgresNode::psql > as much as it seemed reasonable to. The -At options are kind of > irrelevant for what we're going to test here, probably, but why not > keep the default behavior the same? I did drop -q since that > suppresses prompting, and we probably want to test prompt.c using > this infrastructure. That is what my patch does: it tests prompts, tab completion, help, command options… and I added tests till I covered most psql source. -- Fabien. --2056645051-225244493-1577645563=:14206--