File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def unpack_coordinates(coords):
2626
2727 # If we're using BOMs, the version is optional. That means at this point
2828 # we could be dealing with g:a:p or g:a:v
29- is_gradle = pieces [2 ][0 ].isdigit ()
29+ is_gradle = len ( pieces [ 2 ]) and pieces [2 ][0 ].isdigit ()
3030
3131 if len (pieces ) == 3 :
3232 if is_gradle :
Original file line number Diff line number Diff line change @@ -114,6 +114,18 @@ def _multiple_formats_impl(ctx):
114114
115115multiple_formats_test = unittest .make (_multiple_formats_impl )
116116
117+ def _old_format_omitting_version_impl (ctx ):
118+ env = unittest .begin (ctx )
119+
120+ unpacked = unpack_coordinates ("group:artifact:packaging:" )
121+
122+ asserts .equals (env , "" , unpacked .version )
123+ asserts .equals (env , "packaging" , unpacked .packaging )
124+
125+ return unittest .end (env )
126+
127+ old_format_omitting_version_test = unittest .make (_old_format_omitting_version_impl )
128+
117129def coordinates_test_suite ():
118130 unittest .suite (
119131 "coordinates_tests" ,
@@ -125,4 +137,5 @@ def coordinates_test_suite():
125137 gradle_format_with_type_and_classifier_test ,
126138 gradle_format_with_type_but_no_classifier_test ,
127139 multiple_formats_test ,
140+ old_format_omitting_version_test ,
128141 )
You can’t perform that action at this time.
0 commit comments