diff options
Diffstat (limited to 'compat/json/compat_test.go')
-rw-r--r-- | compat/json/compat_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compat/json/compat_test.go b/compat/json/compat_test.go index 0c14a60..c83ca7e 100644 --- a/compat/json/compat_test.go +++ b/compat/json/compat_test.go @@ -98,6 +98,13 @@ func TestCompatIndent(t *testing.T) { "object": {In: `{}`, Out: `{}`}, "non-utf8": {In: "\"\x85\xcd\"", Out: "\"\x85\xcd\""}, "float": {In: `1.200e003`, Out: `1.200e003`}, + "tailws0": {In: `0`, Out: `0`}, + "tailws1": {In: `0 `, Out: `0 `}, + "tailws2": {In: `0 `, Out: `0 `}, + "tailws3": {In: "0\n", Out: "0\n"}, + "headws1": {In: ` 0`, Out: `0`}, + "objws1": {In: `{"a" : 1}`, Out: "{\n>.\"a\": 1\n>}"}, + "objws2": {In: "{\"a\"\n:\n1}", Out: "{\n>.\"a\": 1\n>}"}, } for tcName, tc := range testcases { tc := tc |