2 # Copyright (C) 2002-2004 Kouichirou Eto, All rights reserved.
5 require "chise/management"
7 class TestManagement < Test::Unit::TestCase
9 @cd = CHISE::ChiseDB.instance
10 char_id = "字".char.char_id
11 feature = @cd.get_feature("test-dump")
12 feature.set_value(char_id, "dump test")
13 assert_equal("dump test", feature.get_value(char_id))
16 ds = @cd.instance_eval { @ds }
17 #path = ds.location+"character/feature/test-dump"
18 path = CHISE::DataSource::DB_DIR.path+"character/feature/test-dump"
19 assert_equal(true, path.exist?)
21 txt = CHISE::DataSource::DB_DIR.path+"character/feature/test-dump.txt"
22 #assert_equal(false, txt.exist?)
24 assert_equal(true, txt.exist?)
25 str = txt.open("rb") {|f| f.read }
26 assert_equal("23383\tdump test\n", str)