Minor portability fixes for new TAP script.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 3 Jan 2020 00:44:43 +0000 (19:44 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 3 Jan 2020 00:45:00 +0000 (19:45 -0500)
Satisfy perlcritic, mostly.  Per buildfarm.

src/bin/psql/t/010_tab_completion.pl

index 1c7610ffac4f2958eb6ada8d44d58f7946f2054f..a02cbd8e4761b7d71b2a141952c43586123d5d3e 100644 (file)
@@ -6,7 +6,7 @@ use TestLib;
 use Test::More;
 use IPC::Run qw(pump finish timer);
 
-if ($ENV{with_readline} ne 'yes')
+if (!defined($ENV{with_readline}) || $ENV{with_readline} ne 'yes')
 {
    plan skip_all => 'readline is not supported by this build';
 }
@@ -64,6 +64,7 @@ sub check_completion
    ok($okay, $annotation);
    # for debugging, log actual output if it didn't match
    note 'Actual output was "' . $out . "\"\n" if !$okay;
+   return;
 }
 
 # Clear query buffer to start over
@@ -71,6 +72,7 @@ sub check_completion
 sub clear_query
 {
    check_completion("\\r\n", "postgres=# ", "\\r works");
+   return;
 }
 
 # check basic command completion: SEL<tab> produces SELECT<space>