tests are expected to fail if dirfd () does not exist
[p5sagit/p5-mst-13.2.git] / lib / CPAN / t / vcmp.t
CommitLineData
2787609a 1# -*- Mode: cperl; coding: utf-8; -*-
2
2787609a 3use strict;
4use CPAN;
5use vars qw($D $N);
6
7while (<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;
15print "1..$N\n";
16
17while (@$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__
280 0 0
291 0 1
300 1 -1
311 1 0
321.1 0.0a 1
331.1a 0.0 1
341.2.3 1.1.1 1
35v1.2.3 v1.1.1 1
36v1.2.3 v1.2.1 1
37v1.2.3 v1.2.11 -1
381.2.3 1.2.11 1 # not what they wanted
391.9 1.10 1
40VERSION VERSION 0
410.02 undef 1
421.57_00 1.57 1
431.5700 1.57 1
441.57_01 1.57 1
450.2.10 0.2 1
4620000000.00 19990108 1
471.00 0.96 1
480.7.02 0.7 1
491.3a5 1.3 1
50undef 1.00 -1
51v1.0 undef 1
52v0.2.4 0.24 -1
53v1.0.22 122 -1
545.00556 v5.5.560 0
555.005056 v5.5.56 0
565.00557 v5.5.560 1
575.00056 v5.0.561 -1