diff options
author | David Robillard <d@drobilla.net> | 2021-10-09 13:44:31 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:07 -0500 |
commit | cbf01be4126cbc0f6d80364a7e0b6ad777a7d8ae (patch) | |
tree | 20cd2919e0d4c47caa346123c5701daa70a05ac3 /test/test_writer.c | |
parent | 5ea7c0d763685c23dc6933e273dfa11eec5bec14 (diff) | |
download | serd-cbf01be4126cbc0f6d80364a7e0b6ad777a7d8ae.tar.gz serd-cbf01be4126cbc0f6d80364a7e0b6ad777a7d8ae.tar.bz2 serd-cbf01be4126cbc0f6d80364a7e0b6ad777a7d8ae.zip |
Fix handling of deferred write errors that happen when closing
Diffstat (limited to 'test/test_writer.c')
-rw-r--r-- | test/test_writer.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/test_writer.c b/test/test_writer.c index c719642f..6ffe5d0f 100644 --- a/test/test_writer.c +++ b/test/test_writer.c @@ -126,10 +126,12 @@ null_sink(const void* const buf, static void test_writer_stack_overflow(void) { - SerdWorld* world = serd_world_new(); - SerdNodes* nodes = serd_world_nodes(world); - SerdEnv* env = serd_env_new(SERD_EMPTY_STRING()); - SerdOutputStream output = serd_open_output_stream(null_sink, NULL, NULL); + SerdWorld* world = serd_world_new(); + SerdNodes* nodes = serd_world_nodes(world); + SerdEnv* env = serd_env_new(SERD_EMPTY_STRING()); + + SerdOutputStream output = + serd_open_output_stream(null_sink, NULL, NULL, NULL); SerdWriter* writer = serd_writer_new(world, SERD_TURTLE, 0u, env, &output, 1); @@ -244,7 +246,8 @@ test_write_error(void) // Test with setting errno - SerdOutputStream output = serd_open_output_stream(faulty_sink, NULL, NULL); + SerdOutputStream output = + serd_open_output_stream(faulty_sink, NULL, NULL, NULL); SerdWriter* writer = serd_writer_new(world, SERD_TURTLE, 0u, env, &output, 1); assert(writer); @@ -256,7 +259,7 @@ test_write_error(void) serd_close_output(&output); // Test without setting errno - output = serd_open_output_stream(faulty_sink, NULL, world); + output = serd_open_output_stream(faulty_sink, NULL, NULL, world); writer = serd_writer_new(world, SERD_TURTLE, 0u, env, &output, 1); assert(writer); |