=cut
use strict;
-use Test::More tests => 49;
+use Test::More tests => 57;
use_ok('CGI::Ex::JSONDump');
test_dump({a => 1}, "{}", {skip_keys => ['a']});
test_dump({a => 1}, "{}", {skip_keys => {a=>1}});
-test_dump({2 => 1, _a => 1}, "{2:1,\"_a\":1}", {pretty=>0});
-test_dump({2 => 1, _a => 1}, "{2:1}", {pretty=>0, skip_keys_qr => qr/^_/});
+test_dump({2 => 1, _a => 1}, "{\"2\":1,\"_a\":1}", {pretty=>0});
+test_dump({2 => 1, _a => 1}, "{\"2\":1}", {pretty=>0, skip_keys_qr => qr/^_/});
test_dump({a => 1}, "{\n \"a\" : 1\n}", {pretty => 1});
test_dump({a => 1}, "{\n \"a\" : 1\n}", {pretty => 1, hash_nl => "\n", hash_sep => " : ", indent => " "});
test_dump(1, "1");
+test_dump(0, "0");
test_dump('1.0', '"1.0"');
test_dump('123456789012345', '"123456789012345"');
+test_dump('0.1', '0.1');
+test_dump('.1', '".1"');
+test_dump('00.1', '"00.1"');
test_dump('a', '"a"');
test_dump("\n", '"\\n"');
test_dump("\\", '"\\\\"');
test_dump('<script>', '"<scrip"+"t>"');
test_dump('<script>', "'<scrip'+'t>'", {single_quote => 1});
test_dump('<html>', '"<htm"+"l>"');
+test_dump('<html>', '"<html>"', {no_tag_splitting => 1});
test_dump('<!--', '"<!-"+"-"');
+test_dump('-->', '"--"+">"');
+test_dump('---', '"---"');
+test_dump('--', '"--"');
test_dump('"', '"\\""');
test_dump('a', "'a'", {single_quote => 1});
test_dump('"', "'\"'", {single_quote => 1});