Permalink
Browse files

Introduced a test for shartte/emptyArray bugfix

  • Loading branch information...
1 parent 18cf134 commit 8766c2a2607e1568af14fd8d54c3de1acf217837 @theirix committed Dec 1, 2012
Showing with 5 additions and 0 deletions.
  1. +3 −0 test/expected/regress.out
  2. +2 −0 test/sql/regress.sql
@@ -90,6 +90,9 @@ baz2
-- {"{\"foo\":42}","{\"bar\":[]}"}
select json_array_to_object_array('[{"foo":42}, {"bar":[]}]');
{"{\"foo\":42}","{\"bar\":[]}"}
+-- {}
+select json_array_to_object_array('[]');
+{}
-- {"{\"foo\":42}","{\"bar\":[]}"}
select json_get_object_array('{"key" : [{"foo":42}, {"bar":[]}]}', 'key');
{"{\"foo\":42}","{\"bar\":[]}"}
View
@@ -69,6 +69,8 @@ select (json_array_to_text_array(json_get_object('{"foo":"qq", "bar": ["baz1", "
-- {"{\"foo\":42}","{\"bar\":[]}"}
select json_array_to_object_array('[{"foo":42}, {"bar":[]}]');
+-- {}
+select json_array_to_object_array('[]');
-- {"{\"foo\":42}","{\"bar\":[]}"}
select json_get_object_array('{"key" : [{"foo":42}, {"bar":[]}]}', 'key');

0 comments on commit 8766c2a

Please sign in to comment.