Skip to content

Commit

Permalink
Add trivial test for cr-lf endings.
Browse files Browse the repository at this point in the history
  • Loading branch information
niemeyer committed Jul 9, 2019
1 parent 513397e commit 674ba3e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -773,11 +773,20 @@ var unmarshalTests = []struct {
{
"true\n#" + strings.Repeat(" ", 512*3),
"true",
},
{
}, {
"true #" + strings.Repeat(" ", 512*3),
"true",
},

// CRLF
{
"a: b\r\nc:\r\n- d\r\n- e\r\n",
map[string]interface{}{
"a": "b",
"c": []interface{}{"d", "e"},
},
},

}

type M map[string]interface{}
Expand Down

0 comments on commit 674ba3e

Please sign in to comment.