This repository has been archived on 2021-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
31 lines
688 B
Ruby
31 lines
688 B
Ruby
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("undo", 10)
|
|||
assert_not_nil(icon)
|
|||
assert_match(/undo/, icon.filename)
|
|||
|
|||
assert_not_nil(@theme.choose_icon("undo", 29, [:use_builtin, :no_svg]))
|
|||
end
|
|||
|
|||
def test_contexts
|
|||
only_gtk_version(2, 12)
|
|||
|
|||
assert_operator(@theme.contexts, :include?, "MimeTypes")
|
|||
end
|
|||
|
|||
def test_icons
|
|||
assert_operator(@theme.icons, :include?, "undo")
|
|||
assert_operator(@theme.icons("Actions"), :include?, "remove")
|
|||
end
|
|||
end
|