File: 00_basic.t

package info (click to toggle)
check-postgres 2.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,032 kB
  • sloc: perl: 12,710; sh: 19; makefile: 13
file content (19 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!perl

## Simply test that the script compiles and gives a valid version

use 5.008;
use strict;
use warnings;
use Test::More tests => 2;

eval {
    require 'check_postgres.pl'; ## no critic (RequireBarewordIncludes)
};
like($@, qr{\-\-help}, 'check_postgres.pl compiles');

$@ =~ /help/ or BAIL_OUT "Script did not compile, cancelling rest of tests.\n";

like( $check_postgres::VERSION, qr/^v?\d+\.\d+\.\d+(?:_\d+)?$/,
      qq{Found check_postgres version as "$check_postgres::VERSION"});