Skip to content

Commit

Permalink
Add test ensuring ": " values get quoted.
Browse files Browse the repository at this point in the history
This was reported as PR #43, but is not reproducible.
  • Loading branch information
niemeyer committed Jan 16, 2015
1 parent b7dfe2d commit 71e7ede
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ var marshalTests = []struct {
map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)},
"a: 1.2.3.4\n",
},

// Ensure strings containing ": " are quoted (reported as PR #43, but not reproducible).
{
map[string]string{"a": "b: c"},
"a: 'b: c'\n",
},
}

func (s *S) TestMarshal(c *C) {
Expand Down

0 comments on commit 71e7ede

Please sign in to comment.