Fix [perl #66970] Incorrect coderef in MODIFY_CODE_ATTRIBUTES
[p5sagit/p5-mst-13.2.git] / ext / List-Util / t / isvstring.t
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 $|=1;
17 use Scalar::Util ();
18 use Test::More  (grep { /isvstring/ } @Scalar::Util::EXPORT_FAIL)
19                         ? (skip_all => 'isvstring requires XS version')
20                         : (tests => 3);
21
22 Scalar::Util->import(qw[isvstring]);
23
24 $vs = ord("A") == 193 ? 241.75.240 : 49.46.48;
25
26 ok( $vs == "1.0",       'dotted num');
27 ok( isvstring($vs),     'isvstring');
28
29 $sv = "1.0";
30 ok( !isvstring($sv),    'not isvstring');
31
32
33