diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/jq_tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/jq_tests.py b/tests/jq_tests.py index e5b0b5e..5b8e630 100644 --- a/tests/jq_tests.py +++ b/tests/jq_tests.py @@ -308,6 +308,13 @@ class TestJvToPython(object): assert_equal({"a": {}, "b": {}}, program.input(text='{"a": {}, "b": {}}').first()) assert_equal({"": {"": {}}}, program.input(text='{"": {"": {}}}').first()) + def test_object_keys_containing_null_characters_are_preserved(self): + program = jq.compile(".") + + result = program.input({"a\x00b": None}).first() + + assert_equal({"a\x00b": None}, result) + class TestConvenienceFunctions(object): def test_first_function_with_json_value_input_returns_first_output_element(self): |
