File: test_source_view.rb

package info (click to toggle)
ruby-gnome2 3.1.0-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 16,072 kB
  • ctags: 17,433
  • sloc: ansic: 93,621; ruby: 62,273; xml: 335; sh: 246; makefile: 25
file content (18 lines) | stat: -rw-r--r-- 556 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-

class TestSourceView < Test::Unit::TestCase
  def test_mark_category_background
    view = Gtk::SourceView.new

    red_rgb = [65535, 0, 0]
    red_color = Gdk::Color.parse("red")

    assert_nil(view.get_mark_category_background("new-category"))

    view.set_mark_category_background("new-category", red_color)
    assert_equal(red_rgb, view.get_mark_category_background("new-category").to_a)

    view.set_mark_category_background("new-category", nil)
    assert_nil(view.get_mark_category_background("new-category"))
  end
end