Commit | Line | Data |
2ff28616 |
1 | #!./perl |
2 | |
3 | BEGIN { |
4 | unless (-d 'blib') { |
5 | chdir 't' if -d 't'; |
6 | @INC = '../lib'; |
7 | require Config; import Config; |
8 | keys %Config; # Silence warning |
9 | if ($Config{extensions} !~ /\bList\/Util\b/) { |
10 | print "1..0 # Skip: List::Util was not built\n"; |
11 | exit 0; |
12 | } |
13 | } |
14 | } |
15 | |
16 | use Test::More tests => 3; |
17 | use strict; |
18 | |
19 | $List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1; |
20 | require Scalar::Util; |
21 | |
22 | for my $func (qw(dualvar set_prototype weaken)) { |
23 | eval { Scalar::Util->import($func); }; |
24 | like( |
25 | $@, |
26 | qr/$func is only available with the XS/, |
27 | "no pure perl $func: error raised", |
28 | ); |
29 | } |