Sha256: 29a965272d234b2c7b9d16a774039a5f8d0d26563eb0da7b695163bca62ff455

Contents?: true

Size: 558 Bytes

Versions: 3

Compression:

Stored size: 558 Bytes

Contents

# coding: utf-8
require 'gir_ffi_test_helper'

GirFFI.setup :Pango

# Tests generated methods and functions in the Pango namespace.
describe Pango do
  describe Pango::Language do
    it "has a working method #get_scripts" do
      lang = Pango::Language.from_string 'ja'
      result = lang.get_scripts

      if GLib::SizedArray === result
        scripts = result
      else
        ptr, size = *result
        scripts = GLib::SizedArray.new Pango::Script, size, ptr
      end

      scripts.to_a.must_equal [:han, :katakana, :hiragana]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.6.4 test/integration/generated_pango_test.rb
gir_ffi-0.6.3 test/integration/generated_pango_test.rb
gir_ffi-0.6.2 test/integration/generated_pango_test.rb