Sha256: dbedbf080da95ad5d6846c3cd077ca5c13d792eaf080c47d6421eb57b4f630f7

Contents?: true

Size: 781 Bytes

Versions: 53

Compression:

Stored size: 781 Bytes

Contents

class TestGtkIconTheme < Test::Unit::TestCase
  include GtkTestUtils

  def setup
    @theme = Gtk::IconTheme.default
  end

  def test_choose_icon
    only_gtk_version(2, 12)

    assert_nil(@theme.choose_icon("non-existent", 100))

    icon = @theme.choose_icon("face-cool", 10)
    assert_not_nil(icon)
    assert_match(/face-cool/, icon.filename)

    assert_not_nil(@theme.choose_icon("face-cool", 29, [:use_builtin, :no_svg]))
  end

  def test_contexts
    only_gtk_version(2, 12)

    assert_operator(@theme.contexts, :include?, "MimeTypes")
  end

  class TestIcons < self
    def test_no_argument
      assert_operator(@theme.icons, :include?, "face-cool")
    end

    def test_context
      assert_operator(@theme.icons("Actions"), :include?, "find")
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
gtk2-3.1.1-x64-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.1.1-x86-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.1.1 test/test_gtk_icon_theme.rb
gtk2-3.1.0-x64-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.1.0-x86-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.1.0 test/test_gtk_icon_theme.rb
gtk2-3.0.9-x64-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.9-x86-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.9 test/test_gtk_icon_theme.rb
gtk2-3.0.8-x86-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.8-x64-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.8 test/test_gtk_icon_theme.rb
gtk2-3.0.7-x86-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.7-x64-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.7 test/test_gtk_icon_theme.rb
gtk2-3.0.6-x64-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.6-x86-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.6 test/test_gtk_icon_theme.rb
gtk2-3.0.5-x64-mingw32 test/test_gtk_icon_theme.rb
gtk2-3.0.5-x86-mingw32 test/test_gtk_icon_theme.rb