|
|
@@ -438,6 +438,9 @@ var unmarshalTests = []struct {
|
|
|
{
|
|
|
"foo: ''",
|
|
|
map[string]*string{"foo": new(string)},
|
|
|
+ }, {
|
|
|
+ "foo: null",
|
|
|
+ map[string]*string{"foo": nil},
|
|
|
}, {
|
|
|
"foo: null",
|
|
|
map[string]string{"foo": ""},
|
|
|
@@ -446,6 +449,18 @@ var unmarshalTests = []struct {
|
|
|
map[string]interface{}{"foo": nil},
|
|
|
},
|
|
|
|
|
|
+ // Support for ~
|
|
|
+ {
|
|
|
+ "foo: ~",
|
|
|
+ map[string]*string{"foo": nil},
|
|
|
+ }, {
|
|
|
+ "foo: ~",
|
|
|
+ map[string]string{"foo": ""},
|
|
|
+ }, {
|
|
|
+ "foo: ~",
|
|
|
+ map[string]interface{}{"foo": nil},
|
|
|
+ },
|
|
|
+
|
|
|
// Ignored field
|
|
|
{
|
|
|
"a: 1\nb: 2\n",
|