Sha256: f1aa3070b7b2024f698cbcad6cd50da31fb74af1504882a526f0ec9cdbe275dc

Contents?: true

Size: 590 Bytes

Versions: 24

Compression:

Stored size: 590 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'test_helper'
require 'hexapdf/font/encoding/difference_encoding'
require 'hexapdf/font/encoding/win_ansi_encoding'

describe HexaPDF::Font::Encoding::DifferenceEncoding do
  before do
    base = HexaPDF::Font::Encoding::WinAnsiEncoding.new
    @enc = HexaPDF::Font::Encoding::DifferenceEncoding.new(base)
  end

  describe "name" do
    it "takes the encoding differences into account" do
      assert_equal(:A, @enc.name(65))
      @enc.code_to_name[65] = :B
      assert_equal(:B, @enc.name(65))
      assert_equal(:B, @enc.name(66))
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
hexapdf-0.12.0 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.9 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.8 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.7 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.6 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.5 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.4 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.3 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.2 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.1 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.11.0 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.10.0 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.9.3 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.9.2 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.9.1 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.9.0 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.8.0 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.7.0 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.6.0 test/hexapdf/font/encoding/test_difference_encoding.rb
hexapdf-0.5.0 test/hexapdf/font/encoding/test_difference_encoding.rb