Skip to content

Commit

Permalink
devonfw#893: extended test and fixed doVersionCompare
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Oct 18, 2022
1 parent 2ea3894 commit 8be2073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/src/main/resources/scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1500,8 +1500,8 @@ function doVersionCompare() {
n2="${r2//[^0-9]/}"
local x1="${r1:0:(${#r1}-${#n1})}"
local x2="${r2:0:(${#r2}-${#n2})}"
x1="${x1//[-_+]/}"
x2="${x2//[-_+]/}"
x1="${x1//[-_+*]/}"
x2="${x2//[-_+*]/}"
if [ "${x1}" = "${x2}" ]
then
if [ -z "${n1}" ]
Expand Down
1 change: 1 addition & 0 deletions scripts/src/test/bash/test-version-compare
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ doTestVersionCompare 3.0.0.rc2 '<' 3.0.0
doTestVersionCompare 3.0.0-beta17 '>' 3.0.0-beta11-SNAPSHOT
doTestVersionCompare 3.0.0.11 '>' 3.0.0-beta11-SNAPSHOT
doTestVersionCompare 2020.04.001 '>' 3.3.1
doTestVersionCompare "11*" '>' "11u0"

exit "${exitcode}"

0 comments on commit 8be2073

Please sign in to comment.