summaryrefslogtreecommitdiff
path: root/spec/lib/ci
diff options
context:
space:
mode:
authorJared Deckard <jared.deckard@gmail.com>2016-12-28 08:50:45 -0600
committerJared Deckard <jared.deckard@gmail.com>2016-12-28 16:32:45 -0600
commit44b0b97cf0ce1b8409e926450fb6b4ddc16a229a (patch)
treeb75ac24cc2e3d407eefa6622fa811cfda18b1906 /spec/lib/ci
parent9f3421730d499d4961a69c86ec48eca6cc214c7b (diff)
downloadgitlab-ce-44b0b97cf0ce1b8409e926450fb6b4ddc16a229a.tar.gz
Test newline and carraige return groups
Diffstat (limited to 'spec/lib/ci')
-rw-r--r--spec/lib/ci/ansi2html_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/ci/ansi2html_spec.rb b/spec/lib/ci/ansi2html_spec.rb
index 898f1e84ab0..0762fd7e56a 100644
--- a/spec/lib/ci/ansi2html_spec.rb
+++ b/spec/lib/ci/ansi2html_spec.rb
@@ -136,6 +136,14 @@ describe Ci::Ansi2html, lib: true do
expect(subject.convert("<")[:html]).to eq('&lt;')
end
+ it "replaces newlines with line break tags" do
+ expect(subject.convert("\n")[:html]).to eq('<br>')
+ end
+
+ it "groups carriage returns with newlines" do
+ expect(subject.convert("\r\n")[:html]).to eq('<br>')
+ end
+
describe "incremental update" do
shared_examples 'stateable converter' do
let(:pass1) { subject.convert(pre_text) }