summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/cpan/Scalar-List-Utils/t/isvstring.t
blob: 9d345aa26fad33b73fa37d75da1b6fc4c26460cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!./perl

use strict;
use warnings;

$|=1;
use Scalar::Util ();
use Test::More  (grep { /isvstring/ } @Scalar::Util::EXPORT_FAIL)
			? (skip_all => 'isvstring requires XS version')
			: (tests => 3);

Scalar::Util->import(qw[isvstring]);

my $vs = ord("A") == 193 ? 241.75.240 : 49.46.48;

ok( $vs == "1.0",	'dotted num');
ok( isvstring($vs),	'isvstring');

my $sv = "1.0";
ok( !isvstring($sv),	'not isvstring');