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
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-05-14 18:23:33 +0300
committerRémy Coutable <remy@rymai.me>2018-05-14 18:23:33 +0300
commit59ef79689e0ffe7e693c1eb3e2db1ed417e63a9c (patch)
treec8256032e98e69744c69981292f33f5a69d5af92 /spec
parent801c377c7320707287072282c13b8182bbfc91ff (diff)
parentda5c28a422e3966f6f6780d5e23f13eda4881108 (diff)
Merge branch 'backstage/gb/backport-untrusted-regexp-ee-code' into 'master'
Backport EE-specific untrusted regexp implementation See merge request gitlab-org/gitlab-ce!18938
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/untrusted_regexp_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/untrusted_regexp_spec.rb b/spec/lib/gitlab/untrusted_regexp_spec.rb
index bed58d407ef..0ee7fa1e570 100644
--- a/spec/lib/gitlab/untrusted_regexp_spec.rb
+++ b/spec/lib/gitlab/untrusted_regexp_spec.rb
@@ -39,6 +39,14 @@ describe Gitlab::UntrustedRegexp do
expect(result).to be_falsy
end
+
+ it 'can handle regular expressions in multiline mode' do
+ regexp = described_class.new('^\d', multiline: true)
+
+ result = regexp === "Header\n\n1. Content"
+
+ expect(result).to be_truthy
+ end
end
describe '#scan' do