File: 1.t

package info (click to toggle)
libextutils-pkgconfig-perl 1.07-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 68 kB
  • ctags: 11
  • sloc: perl: 106; makefile: 50; ansic: 12
file content (36 lines) | stat: -rw-r--r-- 798 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
#
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/ExtUtils-PkgConfig/t/1.t,v 1.2 2004/01/25 17:51:48 rwmcfa1 Exp $
#

use strict;
use warnings;

#########################

use Test::More tests => 7;
BEGIN { use_ok('ExtUtils::PkgConfig') };

#########################

$ENV{PKG_CONFIG_PATH} = './t/';

my %pkg;

# test 1 for success
eval { %pkg = ExtUtils::PkgConfig->find(qw/test_glib-2.0/); };
ok( not $@ );
ok( $pkg{modversion} and $pkg{cflags} and $pkg{libs} );

# test 1 for failure
eval { %pkg = ExtUtils::PkgConfig->find(qw/bad1/); };
ok( $@ );

# test 2 for success
eval { %pkg = ExtUtils::PkgConfig->find(qw/bad1 test_glib-2.0/); };
ok( not $@ );
ok( $pkg{modversion} and $pkg{cflags} and $pkg{libs} );

# test 2 for failure
eval { %pkg = ExtUtils::PkgConfig->find(qw/bad1 bad2/); };
ok( $@ );