aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serd_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r--tests/serd_test.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 538febb5..58e6a3db 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -666,9 +666,16 @@ main(void)
serd_node_free(urn_Type);
// Test buffer sink
- SerdBuffer buffer = { NULL, 0 };
- writer = serd_writer_new(
- world, SERD_TURTLE, 0, env, serd_buffer_sink, &buffer);
+ SerdBuffer buffer = { NULL, 0 };
+ SerdByteSink* byte_sink =
+ serd_byte_sink_new((SerdWriteFunc)serd_buffer_sink, &buffer, 1);
+
+ writer = serd_writer_new(world,
+ SERD_TURTLE,
+ 0,
+ env,
+ (SerdWriteFunc)serd_byte_sink_write,
+ byte_sink);
o = serd_new_uri("http://example.org/base");
if (serd_writer_set_base_uri(writer, o)) {
@@ -677,6 +684,7 @@ main(void)
serd_node_free(o);
serd_writer_free(writer);
+ serd_byte_sink_free(byte_sink);
char* out = serd_buffer_sink_finish(&buffer);
if (strcmp((const char*)out, "@base <http://example.org/base> .\n")) {