aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_writer.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-28Support writing all escapes in Turtle and TriG prefixed namesDavid Robillard1-0/+77
2022-01-14Preserve long or short quoting from input documentsDavid Robillard1-1/+7
2022-01-14Remove SERD_CURIE node datatype entirelyDavid Robillard1-1/+3
2022-01-14Expand URIs in readerDavid Robillard1-0/+36
This expands relative and prefixed URIs in the reader on the stack, rather than passing them to the caller to be dealt with. This pushes these context-full forms to the edge of the system as much as possible to minimise the headaches they can cause. Towards having stricter guarantees about nodes and eliminating the CURIE node type altogether.
2022-01-14Move SerdEnv mutation from writer to readerDavid Robillard1-30/+0
Writing having side-effects seems questionable in general, and this prepares things for expanding URIs in the reader.
2022-01-13Make Writer always write to a ByteSinkDavid Robillard1-31/+44
2022-01-13Add empty syntax type for suppressing outputDavid Robillard1-0/+34
2022-01-13Replace SERD_WRITE_STRICT flag with SERD_WRITE_LAXDavid Robillard1-3/+3
The unset value for flags should represent the best default, which in this case is strict parsing. Lax parsing is the riskier opt-in option.
2022-01-13Improve writer error handlingDavid Robillard1-0/+101
2022-01-13Simplify streaming API and improve pretty printingDavid Robillard1-6/+6
This removes the obligation from the caller to correctly maintain flags to describe the current anonymous context, instead making the writer handle this itself as much as possible. Flags remain for the cases the writer can not infer from context: the start of anonymous subject and object nodes.
2022-01-13Replace multiple stream callbacks with SerdEventDavid Robillard1-0/+26
This makes plumbing easier since everything goes through the same "stream" and only one callback is required to handling everything. It's also more easily extensible in case more event types need to be added in the future.
2022-01-13Use SerdNodes to simplify some testsDavid Robillard1-20/+21
2022-01-13Add SerdWorld for shared library stateDavid Robillard1-4/+13
2022-01-13Simplify literal construction APIDavid Robillard1-3/+1
2022-01-13Handle writer stack overflows gracefullyDavid Robillard1-0/+56
2022-01-13Add SerdSink interface and hide implementationsDavid Robillard1-2/+3
2022-01-13Simplify node construction APIDavid Robillard1-5/+34
2022-01-13Merge datatype/language into nodeDavid Robillard1-1/+1
This moves closer to the sord API, and is more convenient in most cases.
2022-01-13Make nodes opaqueDavid Robillard1-4/+7
2022-01-13Rename SerdStyle to SerdWriterFlagsDavid Robillard1-2/+2
2022-01-13Use char* for strings in public APIDavid Robillard1-8/+4
The constant casting just makes user code a mess, for no benefit.
2022-01-13Add SerdBuffer type for mutable buffersDavid Robillard1-3/+3
This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks.
2021-07-10Add missing includeDavid Robillard1-0/+1
2021-07-09Fix accidentally disabled writer testDavid Robillard1-4/+1
2021-02-15Fix writing long literals with triple quotesDavid Robillard1-0/+65