|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | 3 | # Tests for the functions used in universalJavaApplicationStub script |
4 | | -# tofi86 @ 2018-07-29 |
| 4 | +# tofi86 @ 2020-02-11 |
5 | 5 |
|
6 | 6 |
|
7 | 7 |
|
@@ -84,7 +84,7 @@ function get_comparable_java_version() { |
84 | 84 | ################################################################################ |
85 | 85 | function is_valid_requirement_pattern() { |
86 | 86 | local java_req=$1 |
87 | | - java8pattern='1\.[4-8](\.0)?(\.0_[0-9]+)?[*+]?' |
| 87 | + java8pattern='1\.[4-8](\.[0-9]+)?(\.0_[0-9]+)?[*+]?' |
88 | 88 | java9pattern='(9|1[0-9])(-ea|[*+]|(\.[0-9]+){1,2}[*+]?)?' |
89 | 89 | # test matches either old Java versioning scheme (up to 1.8) or new scheme (starting with 9) |
90 | 90 | if [[ ${java_req} =~ ^(${java8pattern}|${java9pattern})$ ]]; then |
@@ -179,6 +179,7 @@ echo "Tests with Java 1.6:" |
179 | 179 | testExtractMajor "1.6" "6" |
180 | 180 | testExtractMajor "1.6+" "6" |
181 | 181 | testExtractMajor "1.6.0" "6" |
| 182 | +testExtractMajor "1.6.2" "6" |
182 | 183 | testExtractMajor "1.6.0_07" "6" |
183 | 184 | testExtractMajor "1.6.0_45" "6" |
184 | 185 | testExtractMajor "1.6.0_65-b14-468" "6" |
@@ -328,6 +329,7 @@ testValidReqPattern "1.6.0_45" "0" |
328 | 329 | testValidReqPattern "1.6.0_45+" "0" |
329 | 330 | testValidReqPattern "1.6.0_100" "0" |
330 | 331 | testValidReqPattern "1.6.0_100+" "0" |
| 332 | +testValidReqPattern "1.6.2" "0" |
331 | 333 | echo "" |
332 | 334 | echo "Tests with old version scheme (invalid requirements):" |
333 | 335 | testValidReqPattern "1.2" "1" |
|
0 commit comments