summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-05-14 10:43:45 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-05-14 10:43:45 +0200
commitda5c28a422e3966f6f6780d5e23f13eda4881108 (patch)
tree3393f8a581516d7dd1bec181dd157fb6ddd8c76a /spec
parentf1a2ada1c07a66d7bd0475748527b36e8c26bf62 (diff)
downloadgitlab-ce-da5c28a422e3966f6f6780d5e23f13eda4881108.tar.gz
Backport EE-specific untrusted regexp implementation
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