summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/ansi2html_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/ansi2html_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/ansi2html_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/ansi2html_spec.rb b/spec/lib/gitlab/ci/ansi2html_spec.rb
index bf1f2bae7da..27c2b005a93 100644
--- a/spec/lib/gitlab/ci/ansi2html_spec.rb
+++ b/spec/lib/gitlab/ci/ansi2html_spec.rb
@@ -150,6 +150,10 @@ RSpec.describe Gitlab::Ci::Ansi2html do
expect(convert_html("\r\n")).to eq('<span><br/></span>')
end
+ it 'replaces invalid UTF-8 data' do
+ expect(convert_html("UTF-8 dashes here: ā”€ā”€ā”€\nšŸ¤šŸ¤šŸ¤šŸ¤\xF0\x9F\x90\n")).to eq("<span>UTF-8 dashes here: ā”€ā”€ā”€<br/>šŸ¤šŸ¤šŸ¤šŸ¤ļæ½<br/></span>")
+ end
+
describe "incremental update" do
shared_examples 'stateable converter' do
let(:pass1_stream) { StringIO.new(pre_text) }