Skip to content

Commit

Permalink
chore: add multiline string tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Mar 12, 2024
1 parent 8dd4379 commit 5f846f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions decode_test.go
Expand Up @@ -844,6 +844,14 @@ func TestDecoder(t *testing.T) {
"v: |\n hello\n ...\n world\n",
map[string]string{"v": "hello\n...\nworld\n"},
},
{
"v: >\n hello\n ...\n world\n",
map[string]string{"v": "hello ... world"},
},
{
"v: \"hello\n ...\n world\n\"",
map[string]string{"v": "hello ... world "},
},
{
"a: !!binary gIGC\n",
map[string]string{"a": "\x80\x81\x82"},
Expand Down Expand Up @@ -2654,8 +2662,8 @@ func TestDecoder_LiteralWithNewLine(t *testing.T) {

func TestDecoder_TabCharacterAtRight(t *testing.T) {
yml := `
- a: [2 , 2]
b: [2 , 2]
- a: [2 , 2]
b: [2 , 2]
c: [2 , 2]`
var v []map[string][]int
if err := yaml.Unmarshal([]byte(yml), &v); err != nil {
Expand Down

0 comments on commit 5f846f9

Please sign in to comment.