diff --git a/src/pkg/reg/util/pattern_test.go b/src/pkg/reg/util/pattern_test.go index c5668f385..fcc95df63 100644 --- a/src/pkg/reg/util/pattern_test.go +++ b/src/pkg/reg/util/pattern_test.go @@ -73,6 +73,16 @@ func TestMatch(t *testing.T) { str: "1.01", match: false, }, + { + pattern: "v2.[4-6].*", // match v2.4.*~v2.7.* version + str: "v2.4.0", + match: true, + }, + { + pattern: "v2.[4-7].*", // match v2.4.*~v2.7.* version + str: "v2.7.0", + match: true, + }, } for _, c := range cases { match, err := Match(c.pattern, c.str)