Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 18:06:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 18:06:39 +0300
commit68b6846fa6c7b630cc8dab7a8474dcc34e4d67d4 (patch)
treef592f2a5fed915184154ffd05e4e44298a192207 /spec/lib/gitlab/regex_spec.rb
parent4db9eeb44af5644eb1d080b4ccf4aff8b90656b9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/regex_spec.rb')
-rw-r--r--spec/lib/gitlab/regex_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb
index 1397add9f5a..c580b46cf8d 100644
--- a/spec/lib/gitlab/regex_spec.rb
+++ b/spec/lib/gitlab/regex_spec.rb
@@ -61,6 +61,12 @@ describe Gitlab::Regex do
it { is_expected.to match('my/image') }
it { is_expected.to match('my/awesome/image-1') }
it { is_expected.to match('my/awesome/image.test') }
+ it { is_expected.to match('my/awesome/image--test') }
+ # docker distribution allows for infinite `-`
+ # https://github.com/docker/distribution/blob/master/reference/regexp.go#L13
+ # but we have a range of 0,10 to add a reasonable limit.
+ it { is_expected.not_to match('my/image-----------test') }
+ it { is_expected.not_to match('my/image-.test') }
it { is_expected.not_to match('.my/image') }
it { is_expected.not_to match('my/image.') }
end