jansson/test/suites/api
Corey Farrell 5df5fc5b13
json_pack: Improve handling of formats with '?' and '*'.
When NULL is received for an optional argument we should not set an
error message as this would block later error messages. If NULL is
received for a non-optional string we should set has_error. Set
has_error for UTF-8 errors to ensure optional strings with UTF-8
errors are not replaced with json_null(). Use 'purpose' argument in
NULL error messages of read_string.

Add error handling and tests for invalid formats where '+', '#', or '%'
is used on an optional string 's?' or 's*'.

Fix NULL string error messages to use 'purpose'.

Refactor skipping of '*' token, this is now handled by read_string and
pack_object_inter. This allows invalid format strings such as 's*#' and
's*+' to produce error messages.

Fixes #437
2018-09-25 16:35:19 -04:00
..
check-exports check-exports test: Filter out symbols that start with an underscore 2013-02-05 12:48:38 +02:00
Makefile.am Improve test coverage. 2018-02-15 10:12:31 -05:00
run Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_array.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_chaos.c More test coverage. 2018-03-06 23:28:14 -05:00
test_copy.c Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_dump_callback.c Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_dump.c Add JSON_EMBED encoding flag 2017-02-27 15:09:03 -05:00
test_equal.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_load_callback.c Document and tweak json_load_callback() 2012-03-26 21:53:21 +03:00
test_load.c Use a more specific error code for premature end of input 2017-12-20 18:27:04 +01:00
test_loadb.c Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_memory_funcs.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_number.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_object.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_pack.c json_pack: Improve handling of formats with '?' and '*'. 2018-09-25 16:35:19 -04:00
test_simple.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_sprintf.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_unpack.c Use last byte of error text as numeric error code 2017-10-03 11:42:07 +02:00
util.h Use last byte of error text as numeric error code 2017-10-03 11:42:07 +02:00