Sha256: 34a3bb0e155f36226baf74f3bac2ca544c123c399858ad8e4935018116b13ce2

Contents?: true

Size: 306 Bytes

Versions: 9

Compression:

Stored size: 306 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'
require 'blackbox/string'

describe BB::String do
  describe '.strip_ansi' do
    it 'strips a few common escape sequences' do
      have = "\e[31;1mX\e[AY\e[2JZ"
      want = 'XYZ'
      expect(BB::String.strip_ansi(have)).to eq(want)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blackbox-4.0.3 spec/string_spec.rb
blackbox-4.0.2 spec/string_spec.rb
blackbox-4.0.1 spec/string_spec.rb
blackbox-4.0.0 spec/string_spec.rb
blackbox-3.3.0 spec/string_spec.rb
blackbox-3.2.0 spec/string_spec.rb
blackbox-3.1.4 spec/string_spec.rb
blackbox-3.1.2 spec/string_spec.rb
blackbox-3.1.1 spec/string_spec.rb