Fix a problem with tests of the form "1.0" vs. "1.0a".
MFC candidate. Pointed out by: knu
This commit is contained in:
parent
aeb55b5464
commit
d3d65388a6
@ -148,7 +148,18 @@ sub CompareNumbers {
|
||||
else {
|
||||
$c1 =~ s/\d+//;
|
||||
$c2 =~ s/\d+//;
|
||||
return &CompareNumbers($c1, $c2);
|
||||
if ($c1 eq $c2) {
|
||||
return 0;
|
||||
}
|
||||
elsif ($c1 eq "") {
|
||||
return -1;
|
||||
}
|
||||
elsif ($c2 eq "") {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return &CompareNumbers($c1, $c2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,8 +61,9 @@ test-pv 0.9 "<" 0.10 inequality
|
||||
test-pv 2.3p10 ">" 2.3p9 number/letter
|
||||
test-pv 1.6.0 ">" 1.6.0.p3 number/letter
|
||||
test-pv 1.0.b ">" 1.0.a3 number/letter
|
||||
test-pv 1.0a "<" 1.0 number/letter
|
||||
test-pv 5.0a "<" 5.0.b number/letter
|
||||
test-pv 1.0a ">" 1.0 number/letter
|
||||
test-pv 1.0a "<" 1.0b number/letter
|
||||
test-pv 5.0a ">" 5.0.b number/letter
|
||||
|
||||
test-pv 1.5_1 ">" 1.5 portrevision
|
||||
test-pv 1.5_2 ">" 1.5_1 portrevision
|
||||
|
Loading…
x
Reference in New Issue
Block a user