Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 8dd70f1

Browse files
committed
[refactoring] java-version-tester: quote function arguments
1 parent 8fa2162 commit 8dd70f1

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

test/java-version-tester.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Java JRE version tester
4-
# tofi86 @ 2017-06-12
4+
# tofi86 @ 2017-10-29
55

66

77

@@ -116,32 +116,32 @@ echo "########################################################"
116116
echo "Testing function extractJavaMajorVersion()"
117117
echo ""
118118
echo "Tests with Java 1.6:"
119-
testExtractMajor 1.6.0 6
120-
testExtractMajor 1.6.0_07 6
121-
testExtractMajor 1.6.0_45 6
119+
testExtractMajor "1.6.0" "6"
120+
testExtractMajor "1.6.0_07" "6"
121+
testExtractMajor "1.6.0_45" "6"
122122
echo ""
123123
echo "Tests with Java 1.7:"
124-
testExtractMajor 1.7.0 7
125-
testExtractMajor 1.7.0_09 7
126-
testExtractMajor 1.7.0_79 7
124+
testExtractMajor "1.7.0" "7"
125+
testExtractMajor "1.7.0_09" "7"
126+
testExtractMajor "1.7.0_79" "7"
127127
echo ""
128128
echo "Tests with Java 1.8:"
129-
testExtractMajor 1.8.0 8
130-
testExtractMajor 1.8.0_05 8
131-
testExtractMajor 1.8.0_91 8
132-
testExtractMajor 1.8.0_131 8
129+
testExtractMajor "1.8.0" "8"
130+
testExtractMajor "1.8.0_05" "8"
131+
testExtractMajor "1.8.0_91" "8"
132+
testExtractMajor "1.8.0_131" "8"
133133
echo ""
134134
echo "Tests with Java 9:"
135-
testExtractMajor 9-ea 9
136-
testExtractMajor 9.0.1 9
137-
testExtractMajor 9.0.23 9
138-
testExtractMajor 9.10.120 9
135+
testExtractMajor "9-ea" "9"
136+
testExtractMajor "9.0.1" "9"
137+
testExtractMajor "9.0.23" "9"
138+
testExtractMajor "9.10.120" "9"
139139
echo ""
140140
echo "Tests with Java 10:"
141-
testExtractMajor 10-ea 10
142-
testExtractMajor 10.0.1 10
143-
testExtractMajor 10.0.23 10
144-
testExtractMajor 10.10.120 10
141+
testExtractMajor "10-ea" "10"
142+
testExtractMajor "10.0.1" "10"
143+
testExtractMajor "10.0.23" "10"
144+
testExtractMajor "10.10.120" "10"
145145

146146

147147
# test function:

0 commit comments

Comments
 (0)