File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
jruby-gradle-base-plugin/src
main/groovy/com/github/jrubygradle/internal
test/groovy/com/github/jrubygradle/internal Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -169,8 +169,8 @@ class GemVersion {
169
169
return 1
170
170
}
171
171
172
- int aaObject
173
- int bbObject
172
+ def aaObject
173
+ def bbObject
174
174
175
175
if (aDigits[index]. isInteger() && bDigits[index]. isInteger()) {
176
176
// compare them as number
Original file line number Diff line number Diff line change @@ -178,4 +178,28 @@ class GemVersionSpec extends Specification {
178
178
expect :
179
179
subject. intersect(' [1.2.4, 1.2.4]' ). conflict() == true
180
180
}
181
+
182
+ def " passes non-integer version ranges with no conflicts" () {
183
+ given :
184
+ GemVersion subject = new GemVersion (' [1.2.bar, 1.2.foo]' )
185
+
186
+ expect :
187
+ ! subject. conflict()
188
+ }
189
+
190
+ def " fails non-integer version ranges with conflicts" () {
191
+ given :
192
+ GemVersion subject = new GemVersion (' [1.2.foo, 1.2.bar]' )
193
+
194
+ expect :
195
+ subject. conflict()
196
+ }
197
+
198
+ def " it does not throw an exception for a '+' version" () {
199
+ when :
200
+ new GemVersion (' +' ). conflict()
201
+
202
+ then :
203
+ notThrown(Exception )
204
+ }
181
205
}
You can’t perform that action at this time.
0 commit comments