Permalink
Browse files

Add test for distinguishable `{}` and null

  • Loading branch information...
gongo committed Jul 23, 2015
1 parent 04e9c50 commit fa0a5fa751e375faa5894429c2599b21a3e2f907
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/json-reformat-test.el
View
@@ -117,6 +117,16 @@ bar\"" (json-reformat:string-to-string "fo\"o\nbar")))
\]" (with-temp-buffer
(insert "[{ \"foo\" : \"bar\" }, { \"foo\" : \"baz\" }]")
(json-reformat-region (point-min) (point-max))
(buffer-string))))
(should (string= "\
{
\"foo\": {
},
\"bar\": null
}" (with-temp-buffer
(insert "{\"foo\" : {}, \"bar\" : null}")
(json-reformat-region (point-min) (point-max))
(buffer-string)))))
(ert-deftest json-reformat-test:json-reformat-region-occur-error ()

0 comments on commit fa0a5fa

Please sign in to comment.