You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 regels
423 B

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