File: tc_font.rb

package info (click to toggle)
libcaca 0.99.beta20-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,512 kB
  • sloc: ansic: 25,091; php: 2,763; python: 2,637; cs: 1,213; cpp: 1,127; java: 916; objc: 836; makefile: 543; perl: 505; sh: 472; asm: 297; ruby: 215; xml: 33
file content (21 lines) | stat: -rw-r--r-- 493 bytes parent folder | download | duplicates (3)
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 < MiniTest::Test
    def test_list
        refute_nil(Caca::Font.list)
    end
    def test_load
        Caca::Font.list.each{|f|
            font = Caca::Font.new(f)
            refute_nil(font)
            refute_nil(font.width)
            refute_nil(font.height)
            refute_nil(font.blocks)
        }
    end
    def test_fail_load
        assert_raises(RuntimeError) {
            Caca::Font.new("This font should not exist")
        }
    end
end