mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
923dd9d1c1
commit
19aa95fc7f
4 changed files with 58 additions and 5 deletions
|
@ -283,6 +283,26 @@ func TestDefaultConfigProvider(t *testing.T) {
|
|||
|
||||
})
|
||||
|
||||
// Issue #8701
|
||||
c.Run("Prevent _merge only maps", func(c *qt.C) {
|
||||
cfg := New()
|
||||
|
||||
cfg.Set("", map[string]interface{}{
|
||||
"B": "bv",
|
||||
})
|
||||
|
||||
cfg.Merge("", map[string]interface{}{
|
||||
"c": map[string]interface{}{
|
||||
"_merge": "shallow",
|
||||
"d": "dv2",
|
||||
},
|
||||
})
|
||||
|
||||
c.Assert(cfg.Get(""), qt.DeepEquals, maps.Params{
|
||||
"b": "bv",
|
||||
})
|
||||
})
|
||||
|
||||
c.Run("IsSet", func(c *qt.C) {
|
||||
cfg := New()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue