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 1inNYR-0002So-P4 for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jan 2020 14:03:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1inNYQ-0003ZS-5M for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jan 2020 14:03:54 +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 1inNYP-0003ZL-P5 for pgsql-hackers@lists.postgresql.org; Fri, 03 Jan 2020 14:03:53 +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 1inNYN-0005bk-B7 for pgsql-hackers@postgresql.org; Fri, 03 Jan 2020 14:03:52 +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 003E3lf0014262; Fri, 3 Jan 2020 09:03:47 -0500 From: Tom Lane To: Christoph Berg cc: PostgreSQL Hackers Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic. In-reply-to: <20200103110128.GA28967@msg.df7cb.de> References: <20200103110128.GA28967@msg.df7cb.de> Comments: In-reply-to Christoph Berg message dated "Fri, 03 Jan 2020 12:01:29 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14260.1578060227.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 03 Jan 2020 09:03:47 -0500 Message-ID: <14261.1578060227@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Christoph Berg writes: > Shouldn't this print some "expected foo, got bar" diagnostics instead > of just dying? BTW, as far as that goes, we do: see for instance the tail end of https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Ddesmoxytes&dt=3D= 2020-01-02%2020%3A04%3A03 ok 8 - offer multiple table choices ok 9 - finish completion of one of multiple table choices ok 10 - \r works not ok 11 - complete \DRD to \drds # Failed test 'complete \DRD to \drds' # at t/010_tab_completion.pl line 64. # Actual output was "\DRD=07" ok 12 - \r works Not sure why you are not seeing the "Actual output" bit in your log. I used a "note" command to print it, maybe that's not best practice? Also, while I'm asking for Perl advice: I can see in my editor that there's a control-G bell character in that string, but this is far from obvious on the web page. I'd kind of like to get the report to escapify control characters so that what comes out is more like # Actual output was "\DRD^G" or # Actual output was "\\DRD\007" or some such. Anybody know an easy way to do that in Perl? regards, tom lane