ruby/t/tc_font.rb
raw| 1 | require 'caca' |
| 2 | |
| 3 | class TC_Canvas < MiniTest::Test |
| 4 | def test_list |
| 5 | refute_nil(Caca::Font.list) |
| 6 | end |
| 7 | def test_load |
| 8 | Caca::Font.list.each{|f| |
| 9 | font = Caca::Font.new(f) |
| 10 | refute_nil(font) |
| 11 | refute_nil(font.width) |
| 12 | refute_nil(font.height) |
| 13 | refute_nil(font.blocks) |
| 14 | } |
| 15 | end |
| 16 | def test_fail_load |
| 17 | assert_raises(RuntimeError) { |
| 18 | Caca::Font.new("This font should not exist") |
| 19 | } |
| 20 | end |
| 21 | end |