### test/ebdic-common.rb -- common route for unit test of ebdic modules

require 'skkserv/ebdic.rb'
require 'runit/testcase'

$stdout.sync = true

class TestEBDicCommon <RUNIT::TestCase
  def setup(path, subdic)
    @path = path
    @subdic = subdic
    @ebdic = EBDic.new(@path, @subdic)
  end

  def join(arg)
    arg.join(",")
  end

  def search(kana)
    @ebdic.search(kana)
  end

  def check(expect, result)
    assert_equal(join(expect), join(result))
  end
end

### test/ebdic-common.rb ends here
