This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update to Scalar-List-Utils 1.11
[perl5.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 require Scalar::Util;
18 if (grep { /isvstring/ } @Scalar::Util::EXPORT_FAIL) {
19     print("1..0\n");
20     exit 0;
21 }
22
23 Scalar::Util->import(qw[isvstring]);
24
25 print "1..4\n";
26
27 print "ok 1\n";
28
29 $vs = 49.46.48;
30
31 print "not " unless $vs == "1.0";
32 print "ok 2\n";
33
34 print "not " unless isvstring($vs);
35 print "ok 3\n";
36
37 $sv = "1.0";
38 print "not " if isvstring($sv);
39 print "ok 4\n";
40
41
42