mirror of
https://github.com/restic/restic.git
synced 2025-12-08 06:09:56 +00:00
Upadte vendored dependencies
This commit is contained in:
parent
315b7f282f
commit
8d37b723ca
380 changed files with 136541 additions and 78532 deletions
12
vendor/github.com/go-ini/ini/key_test.go
generated
vendored
12
vendor/github.com/go-ini/ini/key_test.go
generated
vendored
|
|
@ -73,7 +73,7 @@ func Test_Key(t *testing.T) {
|
|||
|
||||
Convey("Get sections", func() {
|
||||
sections := cfg.Sections()
|
||||
for i, name := range []string{DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "advance"} {
|
||||
for i, name := range []string{DEFAULT_SECTION, "author", "package", "package.sub", "features", "types", "array", "note", "comments", "string escapes", "advance"} {
|
||||
So(sections[i].Name(), ShouldEqual, name)
|
||||
}
|
||||
})
|
||||
|
|
@ -243,6 +243,16 @@ func Test_Key(t *testing.T) {
|
|||
timesEqual(vals6, t, t, t)
|
||||
})
|
||||
|
||||
Convey("Test string slice escapes", func() {
|
||||
sec := cfg.Section("string escapes")
|
||||
So(sec.Key("key1").Strings(","), ShouldResemble, []string{"value1", "value2", "value3"})
|
||||
So(sec.Key("key2").Strings(","), ShouldResemble, []string{"value1, value2"})
|
||||
So(sec.Key("key3").Strings(","), ShouldResemble, []string{`val\ue1`, "value2"})
|
||||
So(sec.Key("key4").Strings(","), ShouldResemble, []string{`value1\`, `value\\2`})
|
||||
So(sec.Key("key5").Strings(",,"), ShouldResemble, []string{"value1,, value2"})
|
||||
So(sec.Key("key6").Strings(" "), ShouldResemble, []string{"aaa", "bbb and space", "ccc"})
|
||||
})
|
||||
|
||||
Convey("Get valid values into slice", func() {
|
||||
sec := cfg.Section("array")
|
||||
vals1 := sec.Key("FLOAT64S").ValidFloat64s(",")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue