File: tc_font.rb

package info (click to toggle)
libcaca 0.99.beta18-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,936 kB
  • sloc: ansic: 22,177; python: 2,316; cs: 1,213; cpp: 1,107; java: 916; objc: 836; makefile: 636; sh: 381; ruby: 193; asm: 65
file content (21 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'caca'

class TC_Canvas < Test::Unit::TestCase
    def test_list
	assert_not_nil(Caca::Font.list)
    end
    def test_load
	Caca::Font.list.each{|f|
		font = Caca::Font.new(f)
		assert_not_nil(font)
		assert_not_nil(font.width)
		assert_not_nil(font.height)
		assert_not_nil(font.blocks)
	}
    end
    def test_fail_load
	assert_raise(RuntimeError) {
		Caca::Font.new("This font should not exist")
	}
    end
end