File: isvstring.t

package info (click to toggle)
libscalar-list-utils-perl 1%3A1.47-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 496 kB
  • sloc: perl: 1,567; ansic: 130; makefile: 3
file content (23 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (6)
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');