Commit | Line | Data |
60f3865b |
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 | } |
60f3865b |
14 | } |
15 | |
97605c51 |
16 | $|=1; |
cf083cf9 |
17 | use Scalar::Util (); |
18 | use Test::More (grep { /isvstring/ } @Scalar::Util::EXPORT_FAIL) |
19 | ? (skip_all => 'isvstring requires XS version') |
20 | : (tests => 3); |
97605c51 |
21 | |
22 | Scalar::Util->import(qw[isvstring]); |
60f3865b |
23 | |
a901eef8 |
24 | $vs = ord("A") == 193 ? 241.75.240 : 49.46.48; |
60f3865b |
25 | |
cf083cf9 |
26 | ok( $vs == "1.0", 'dotted num'); |
27 | ok( isvstring($vs), 'isvstring'); |
60f3865b |
28 | |
29 | $sv = "1.0"; |
cf083cf9 |
30 | ok( !isvstring($sv), 'not isvstring'); |
60f3865b |
31 | |
32 | |
33 | |