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
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-30 19:57:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-30 19:57:06 +0300
commitb4cf4027c64afc4f009452a9bfade231e2ff421a (patch)
treecfa307b5d1583471285709032f559ab2ac4be1d5 /spec/lib
parent0cb369aa5f70b59e5922d8f5431a3302fd93574e (diff)
Add latest changes from gitlab-org/security/gitlab@13-5-stable-ee
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/regex_spec.rb15
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 }