From 44b0b97cf0ce1b8409e926450fb6b4ddc16a229a Mon Sep 17 00:00:00 2001 From: Jared Deckard Date: Wed, 28 Dec 2016 08:50:45 -0600 Subject: Test newline and carraige return groups --- spec/lib/ci/ansi2html_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec') 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('<') end + it "replaces newlines with line break tags" do + expect(subject.convert("\n")[:html]).to eq('
') + end + + it "groups carriage returns with newlines" do + expect(subject.convert("\r\n")[:html]).to eq('
') + end + describe "incremental update" do shared_examples 'stateable converter' do let(:pass1) { subject.convert(pre_text) } -- cgit v1.2.1