Sha256: 0b938fc315817109e3ab2fda67cf0c5a4379704ade22bc99b1dd5cdaaa8586cd

Contents?: true

Size: 723 Bytes

Versions: 26

Compression:

Stored size: 723 Bytes

Contents

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

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

  def test_choose_icon
    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
    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

26 entries across 26 versions & 1 rubygems

Version Path
gtk3-3.0.2-x86-mingw32 test/test-gtk-icon-theme.rb
gtk3-3.0.2-x64-mingw32 test/test-gtk-icon-theme.rb
gtk3-3.0.2 test/test-gtk-icon-theme.rb
gtk3-3.0.1-x86-mingw32 test/test-gtk-icon-theme.rb
gtk3-3.0.1-x64-mingw32 test/test-gtk-icon-theme.rb
gtk3-3.0.1 test/test-gtk-icon-theme.rb
gtk3-3.0.0-x86-mingw32 test/test-gtk-icon-theme.rb
gtk3-3.0.0-x64-mingw32 test/test-gtk-icon-theme.rb
gtk3-2.2.5-x64-mingw32 test/test_gtk_icon_theme.rb
gtk3-2.2.5-x86-mingw32 test/test_gtk_icon_theme.rb
gtk3-2.2.5 test/test_gtk_icon_theme.rb
gtk3-2.2.4-x64-mingw32 test/test_gtk_icon_theme.rb
gtk3-2.2.4-x86-mingw32 test/test_gtk_icon_theme.rb
gtk3-2.2.4 test/test_gtk_icon_theme.rb
gtk3-2.2.3-x86-mingw32 test/test_gtk_icon_theme.rb
gtk3-2.2.3 test/test_gtk_icon_theme.rb
gtk3-2.2.2-x86-mingw32 test/test_gtk_icon_theme.rb
gtk3-2.2.2 test/test_gtk_icon_theme.rb
gtk3-2.2.1-x86-mingw32 test/test_gtk_icon_theme.rb
gtk3-2.2.1 test/test_gtk_icon_theme.rb