Sha256: 2e834e3c7141599f4cfac885801dc1ccc4c2a1795a5e93561fda13fff9706edd

Contents?: true

Size: 388 Bytes

Versions: 9

Compression:

Stored size: 388 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe TTY::Table::Operation::Escape, '#call' do
  let(:object) { described_class }
  let(:text)   { "太丸\nゴシ\tック体\r" }
  let(:field)  { TTY::Table::Field.new(text) }

  subject(:operation) { object.new }

  it 'changes field value' do
    expect(operation.call(field, 0, 0)).to eql("太丸\\nゴシ\\tック体\\r")
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tty-table-0.10.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.9.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.8.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.7.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.6.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.5.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.4.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.3.0 spec/unit/operation/escape/call_spec.rb
tty-table-0.2.0 spec/unit/operation/escape/call_spec.rb