Sha256: bb4f95c4912986f1207781e7f30bbf39cab524a62b6c029ee5699710efa04006

Contents?: true

Size: 571 Bytes

Versions: 20

Compression:

Stored size: 571 Bytes

Contents

# encoding: UTF-8

require 'spec_helper'

module ICU
  module Normalization
    #  http://bugs.icu-project.org/trac/browser/icu/trunk/source/test/cintltst/cnormtst.c

    describe "Normalization" do

      it "should normalize a string - decomposed" do
        ICU::Normalization.normalize("Å", :nfd).unpack("U*").should == [65, 778]
      end

      it "should normalize a string - composed" do
        ICU::Normalization.normalize("Å", :nfc).unpack("U*").should == [197]
      end

      # TODO: add more normalization tests


    end
  end # Normalization
end # ICU

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ffi-icu-0.2.0 spec/normalization_spec.rb
ffi-icu-0.1.10 spec/normalization_spec.rb
ffi-icu-0.1.9 spec/normalization_spec.rb
ffi-icu-0.1.8 spec/normalization_spec.rb
ffi-icu-0.1.7 spec/normalization_spec.rb
ffi-icu-0.1.6 spec/normalization_spec.rb
ffi-icu-0.1.5 spec/normalization_spec.rb
ffi-icu-0.1.4 spec/normalization_spec.rb
ffi-icu-0.1.3 spec/normalization_spec.rb
ffi-icu-0.1.2 spec/normalization_spec.rb
ffi-icu-0.1.1 spec/normalization_spec.rb
ffi-icu-0.1.0 spec/normalization_spec.rb
ffi-icu-0.0.9 spec/normalization_spec.rb
ffi-icu-0.0.8 spec/normalization_spec.rb
ffi-icu-0.0.7 spec/normalization_spec.rb
ffi-icu-0.0.6 spec/normalization_spec.rb
ffi-icu-0.0.5 spec/normalization_spec.rb
ffi-icu-0.0.4 spec/normalization_spec.rb
ffi-icu-0.0.3 spec/normalization_spec.rb
ffi-icu-0.0.2 spec/normalization_spec.rb