mirror of
https://github.com/json-c/json-c.git
synced 2026-04-03 04:19:07 +08:00
Fix memory leak and inconsistent output (due to varying fd numbers) in test_util_file.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
OK: json_object_from_fd(./valid.json)={ "foo": 123 }
|
||||
OK: json_object_from_file(./not_present.json) correctly returned NULL: json_object_from_file: error opening file ./not_present.json: ERRNO=ENOENT
|
||||
|
||||
OK: json_object_from_fd(closed_fd), expecting NULL, EBADF, got:0x0, json_object_from_fd: error reading fd 3: ERRNO=EBADF
|
||||
OK: json_object_from_fd(closed_fd), expecting NULL, EBADF, got:0x0, json_object_from_fd: error reading fd 10: ERRNO=EBADF
|
||||
|
||||
OK: json_object_to_file(json.out, jso)=0
|
||||
file[json.out], size=336, contents={"foo":1234,"foo1":"abcdefghijklmnopqrstuvwxyz","foo2":"abcdefghijklmnopqrstuvwxyz","foo3":"abcdefghijklmnopqrstuvwxyz","foo4":"abcdefghijklmnopqrstuvwxyz","foo5":"abcdefghijklmnopqrstuvwxyz","foo6":"abcdefghijklmnopqrstuvwxyz","foo7":"abcdefghijklmnopqrstuvwxyz","foo8":"abcdefghijklmnopqrstuvwxyz","foo9":"abcdefghijklmnopqrstuvwxyz"}
|
||||
|
||||
Reference in New Issue
Block a user