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 1ilckh-00081l-ST for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2019 17:53:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ilckg-00061r-ML for pgsql-hackers@arkaria.postgresql.org; Sun, 29 Dec 2019 17:53:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ilckg-00061k-A8 for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2019 17:53:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ilckd-000118-7r for pgsql-hackers@lists.postgresql.org; Sun, 29 Dec 2019 17:53:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xBTHrBR2030271; Sun, 29 Dec 2019 12:53:11 -0500 From: Tom Lane To: Fabien COELHO cc: PostgreSQL Developers Subject: Re: TAP testing for psql's tab completion code In-reply-to: References: <10967.1577562752@sss.pgh.pa.us> <7904.1577573534@sss.pgh.pa.us> <28327.1577639622@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Sun, 29 Dec 2019 18:42:36 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30269.1577641991.1@sss.pgh.pa.us> Date: Sun, 29 Dec 2019 12:53:11 -0500 Message-ID: <30270.1577641991@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fabien COELHO writes: > I've looked at your PoC implementation: > 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. We don't want the test silently deciding that things are OK if the first thing it tries doesn't work. (For comparison, the SSL tests are also enabled by configure's opinion not some other way -- I was mostly copying how that works.) > 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. regards, tom lane