Commit | Line | Data |
4440d13a |
1 | #!/usr/bin/perl -w |
2 | |
3 | ############################################################################### |
4 | # Test in_effect() |
5 | |
6 | use Test::More; |
7 | use strict; |
8 | |
9 | BEGIN |
10 | { |
11 | $| = 1; |
12 | chdir 't' if -d 't'; |
13 | unshift @INC, '../lib'; |
14 | plan tests => 9; |
15 | } |
16 | |
17 | use bigint; |
18 | use bignum; |
19 | use bigrat; |
20 | |
21 | can_ok ('bigint', qw/in_effect/); |
22 | can_ok ('bignum', qw/in_effect/); |
23 | can_ok ('bigrat', qw/in_effect/); |
24 | |
25 | SKIP: { |
26 | skip ('Need at least Perl v5.9.4', 3) unless $] > 5.009004; |
27 | |
28 | is (bigint::in_effect(), 1, 'bigint in effect'); |
29 | is (bignum::in_effect(), 1, 'bignum in effect'); |
30 | is (bigrat::in_effect(), 1, 'bigrat in effect'); |
31 | } |
32 | |
33 | { |
34 | no bigint; |
35 | no bignum; |
36 | no bigrat; |
37 | |
38 | is (bigint::in_effect(), undef, 'bigint not in effect'); |
39 | is (bignum::in_effect(), undef, 'bignum not in effect'); |
40 | is (bigrat::in_effect(), undef, 'bigrat not in effect'); |
41 | } |
42 | |