diff options
Diffstat (limited to 'spec/lib')
-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 } |