File: 00_basic.t

package info (click to toggle)
check-postgres 2.22.0-2%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 996 kB
  • sloc: perl: 10,308; makefile: 13; sh: 13
file content (19 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (4)
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.006;
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"});