File: 3.t

package info (click to toggle)
libextutils-pkgconfig-perl 1.16-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: perl: 175; ansic: 31; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 781 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
# $Id$
#

use strict;
use warnings;
use English; # uses $OSNAME below

use Test::More tests => 6;
use ExtUtils::PkgConfig;

$ENV{PKG_CONFIG_PATH} = './t/';
my ($major, $minor) = split /\./, `pkg-config --version`;

ok( ExtUtils::PkgConfig->atleast_version(qw/test_glib-2.0/, '2.2.0') );
ok( not ExtUtils::PkgConfig->atleast_version(qw/test_glib-2.0/, '2.3.0') );

ok( ExtUtils::PkgConfig->exact_version(qw/test_glib-2.0/, '2.2.3') );
ok( not ExtUtils::PkgConfig->exact_version(qw/test_glib-2.0/, '2.3.0') );

SKIP: {
    skip("OpenBSD bug in pkg-config clone", 2)
      if($OSNAME eq "openbsd" && ($major == 0 && $minor <= 26));
    ok( ExtUtils::PkgConfig->max_version(qw/test_glib-2.0/, '2.3.0') );
    ok( not ExtUtils::PkgConfig->max_version(qw/test_glib-2.0/, '2.1.0') );
}