diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-30 16:57:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-30 16:57:06 +0000 |
commit | b4cf4027c64afc4f009452a9bfade231e2ff421a (patch) | |
tree | cfa307b5d1583471285709032f559ab2ac4be1d5 /spec/lib/gitlab/regex_spec.rb | |
parent | 0cb369aa5f70b59e5922d8f5431a3302fd93574e (diff) | |
download | gitlab-ce-b4cf4027c64afc4f009452a9bfade231e2ff421a.tar.gz |
Add latest changes from gitlab-org/security/gitlab@13-5-stable-ee
Diffstat (limited to 'spec/lib/gitlab/regex_spec.rb')
-rw-r--r-- | spec/lib/gitlab/regex_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb index 66ed80a7d61..451526021c1 100644 --- a/spec/lib/gitlab/regex_spec.rb +++ b/spec/lib/gitlab/regex_spec.rb @@ -368,6 +368,21 @@ RSpec.describe Gitlab::Regex do it { is_expected.not_to match('%2e%2e%2f1.2.3') } end + describe '.nuget_package_name_regex' do + subject { described_class.nuget_package_name_regex } + + it { is_expected.to match('My.Package') } + it { is_expected.to match('My.Package.Mvc') } + it { is_expected.to match('MyPackage') } + it { is_expected.to match('My.23.Package') } + it { is_expected.to match('My23Package') } + it { is_expected.to match('runtime.my-test64.runtime.package.Mvc') } + it { is_expected.to match('my_package') } + it { is_expected.not_to match('My/package') } + it { is_expected.not_to match('../../../my_package') } + it { is_expected.not_to match('%2e%2e%2fmy_package') } + end + describe '.pypi_version_regex' do subject { described_class.pypi_version_regex } |