Class: DmenuTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
Dmenu
Defined in:
lib/test.rb

Instance Method Summary collapse

Methods included from Dmenu

alignr, dmenu, scrunch

Instance Method Details

#test_1Object



8
9
10
# File 'lib/test.rb', line 8

def test_1
    assert_equal(10, Dmenu::scrunch("012345678901234567890", 10).width)
end

#test_2Object



11
12
13
# File 'lib/test.rb', line 11

def test_2
    assert(Dmenu::scrunch("患部で止まってすぐ溶ける ~ 狂気の優曇華院 (03:04)", 10).width <= 10)
end

#test_3Object



14
15
16
# File 'lib/test.rb', line 14

def test_3
    assert_not_nil(Dmenu::dmenu(%w<a b c>))
end