mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 05:04:50 +00:00
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
51be6918b5
commit
a4d6eeb369
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75715
|
@ -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…
Reference in a new issue