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