mirror of
https://github.com/go-ini/ini.git
synced 2026-06-19 21:46:45 +02:00
fix test cases
This commit is contained in:
@@ -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("无闻")
|
||||||
|
|||||||
Reference in New Issue
Block a user