File: 03accessors.t

package info (click to toggle)
libextutils-cchecker-perl 0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 180 kB
  • sloc: perl: 343; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 777 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
#!/usr/bin/perl

use v5.14;
use warnings;

use Test2::V0;

use ExtUtils::CChecker;

my $cc = ExtUtils::CChecker->new;

is( $cc->include_dirs, [], 'include_dirs empty initially' );

$cc->push_include_dirs( "/usr/include/foo" );
is( $cc->include_dirs, [ "/usr/include/foo" ], 'include_dirs after push_include_dirs' );

is( $cc->extra_compiler_flags, [], 'extra_compiler_flags empty initially' );

$cc->push_extra_compiler_flags( "-DHAVE_FOO" );
is( $cc->extra_compiler_flags, [ "-DHAVE_FOO" ], 'extra_compiler_flags after push_extra_compiler_flags' );

is( $cc->extra_linker_flags, [], 'extra_linker_flags empty initially' );

$cc->push_extra_linker_flags( "-lfoo" );
is( $cc->extra_linker_flags, [ "-lfoo" ], 'extra_linker_flags after push_extra_linker_flags' );

done_testing;