Skip signals and core dump tests on Win32
[p5sagit/p5-mst-13.2.git] / lib / CPAN / t / vcmp.t
1 # -*- Mode: cperl; coding: utf-8; -*-
2
3 use strict;
4 use CPAN;
5 use vars qw($D $N);
6
7 while (<DATA>) {
8   next if /^v/ && $]<5.006; # v-string tests are not for pre-5.6.0
9   chomp;
10   s/\s*#.*//;
11   push @$D, [ split ];
12 }
13
14 $N = scalar @$D;
15 print "1..$N\n";
16
17 while (@$D) {
18   my($l,$r,$exp) = @{shift @$D};
19   my $res = CPAN::Version->vcmp($l,$r);
20   if ($res != $exp){
21     print "# l[$l]r[$r]exp[$exp]res[$res]\n";
22     print "not ";
23   }
24   print "ok ", $N-@$D, "\n";
25 }
26
27 __END__
28 0 0 0
29 1 0 1
30 0 1 -1
31 1 1 0
32 1.1 0.0a 1
33 1.1a 0.0 1
34 1.2.3 1.1.1 1
35 v1.2.3 v1.1.1 1
36 v1.2.3 v1.2.1 1
37 v1.2.3 v1.2.11 -1
38 1.2.3 1.2.11 1 # not what they wanted
39 1.9 1.10 1
40 VERSION VERSION 0
41 0.02 undef 1
42 1.57_00 1.57 1
43 1.5700 1.57 1
44 1.57_01 1.57 1
45 0.2.10 0.2 1
46 20000000.00 19990108 1
47 1.00 0.96 1
48 0.7.02 0.7 1
49 1.3a5 1.3 1
50 undef 1.00 -1
51 v1.0 undef 1
52 v0.2.4 0.24 -1
53 v1.0.22 122 -1
54 5.00556 v5.5.560 0
55 5.005056 v5.5.56 0
56 5.00557 v5.5.560 1
57 5.00056 v5.0.561 -1