fix test cases

This commit is contained in:
Unknwon
2014-12-21 08:10:34 -05:00
parent 3fba6692fa
commit e2e901b1d9
+5
View File
@@ -145,6 +145,7 @@ func Test_Values(t *testing.T) {
Convey("Get values in default section", func() { Convey("Get values in default section", func() {
sec := cfg.Section("") sec := cfg.Section("")
So(sec, ShouldNotBeNil) So(sec, ShouldNotBeNil)
So(sec.Key("NAME").Value(), ShouldEqual, "ini")
So(sec.Key("NAME").String(), ShouldEqual, "ini") So(sec.Key("NAME").String(), ShouldEqual, "ini")
So(sec.Key("NAME").Comment, ShouldEqual, "; Package name") So(sec.Key("NAME").Comment, ShouldEqual, "; Package name")
So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v0") So(sec.Key("IMPORT_PATH").String(), ShouldEqual, "gopkg.in/ini.v0")
@@ -255,6 +256,10 @@ func Test_Values(t *testing.T) {
} }
}) })
Convey("Get key hash", func() {
cfg.Section("").KeysHash()
})
Convey("Set key value", func() { Convey("Set key value", func() {
k := cfg.Section("author").Key("NAME") k := cfg.Section("author").Key("NAME")
k.SetValue("无闻") k.SetValue("无闻")