Sha256: 81ffe23507da9e815eef092c89cbb13a626add416b1e7225c9099dfb5d4495ab

Contents?: true

Size: 579 Bytes

Versions: 4

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

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 result.is_a? GirFFI::SizedArray
        scripts = result
      else
        ptr, size = *result
        scripts = GirFFI::SizedArray.new Pango::Script, size, ptr
      end

      _(scripts).must_be :==, [:han, :katakana, :hiragana]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.15.3 test/integration/generated_pango_test.rb
gir_ffi-0.15.2 test/integration/generated_pango_test.rb
gir_ffi-0.15.1 test/integration/generated_pango_test.rb
gir_ffi-0.15.0 test/integration/generated_pango_test.rb