summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/yaml.v2/decode_test.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2018-01-16 12:03:31 -0500
committerGitHub <noreply@github.com>2018-01-16 12:03:31 -0500
commit2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 (patch)
treee08ff912e1924c06939f314168c3362d6f1ec0de /vendor/gopkg.in/yaml.v2/decode_test.go
parentf5c8a71698d0a7a16c68be220e49fe64bfee7f5c (diff)
downloadchat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.gz
chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.bz2
chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.zip
Updated dependencies and added avct/uasurfer (#8089)
* Updated dependencies and added avct/uasurfer * Added uasurfer to NOTICE.txt
Diffstat (limited to 'vendor/gopkg.in/yaml.v2/decode_test.go')
-rw-r--r--vendor/gopkg.in/yaml.v2/decode_test.go17
1 files changed, 16 insertions, 1 deletions
diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go
index 713b1ee9c..e5366c261 100644
--- a/vendor/gopkg.in/yaml.v2/decode_test.go
+++ b/vendor/gopkg.in/yaml.v2/decode_test.go
@@ -440,12 +440,27 @@ var unmarshalTests = []struct {
map[string]*string{"foo": new(string)},
}, {
"foo: null",
+ map[string]*string{"foo": nil},
+ }, {
+ "foo: null",
map[string]string{"foo": ""},
}, {
"foo: null",
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",
@@ -984,7 +999,7 @@ func (s *S) TestUnmarshalStrict(c *C) {
err = yaml.Unmarshal([]byte("a: 1\nb: 2\nc: 3"), &v)
c.Check(err, IsNil)
err = yaml.UnmarshalStrict([]byte("a: 1\nb: 2\nc: 3"), &v)
- c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 1: field c not found in struct struct { A int; B int }")
+ c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 3: field c not found in struct struct { A int; B int }")
}
//var data []byte