aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_writer.c
AgeCommit message (Collapse)AuthorFilesLines
2023-12-02Use ZixAllocator directlyDavid Robillard1-7/+7
2023-12-02Use ZixStringView directlyDavid Robillard1-19/+20
2023-12-02Use SerdNodes instead of manual memory management in testsDavid Robillard1-15/+18
2023-12-02Use SerdNodes to simplify some testsDavid Robillard1-55/+62
2023-12-02Cache commonly used nodes in the worldDavid Robillard1-2/+1
2023-12-02Add SerdNodes for storing a cache of interned nodesDavid Robillard1-9/+12
2023-12-02[WIP] Generalize node construction APIDavid Robillard1-33/+38
2023-12-02Add support for custom allocatorsDavid Robillard1-87/+182
This makes it explicit in the API where memory is allocated, and allows the user to provide a custom allocator to avoid the use of the default system allocator for whatever reason.
2023-12-02Add command-line option to write output to a fileDavid Robillard1-1/+1
2023-12-02[WIP] Remove SERD_CURIE node datatype entirelyDavid Robillard1-1/+2
2023-12-02[WIP] Expand URIs in readerDavid Robillard1-0/+31
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.
2023-12-02[WIP] Move SerdEnv mutation from writer to readerDavid Robillard1-32/+0
Writing having side-effects seems questionable in general, and this prepares things for expanding URIs in the reader.
2023-12-02[WIP] Preserve long or short quoting from input documentsDavid Robillard1-1/+3
2023-12-02Simplify output stream APIDavid Robillard1-38/+71
2023-12-02Make SerdBuffer an output streamDavid Robillard1-10/+15
2023-12-02Support writing all escapes in Turtle and TriG prefixed namesDavid Robillard1-0/+74
2023-12-02Add empty syntax type for suppressing outputDavid Robillard1-0/+33
2023-12-02Use a simple type-safe stack in writerDavid Robillard1-0/+47
2023-12-02Replace SERD_WRITE_STRICT flag with SERD_WRITE_LAXDavid Robillard1-4/+4
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.
2023-12-02Simplify statement flagsDavid Robillard1-2/+2
2023-12-02Replace multiple stream callbacks with SerdEventDavid Robillard1-1/+27
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.
2023-12-02Add SerdWorld for shared library stateDavid Robillard1-11/+24
2023-12-02Add SerdSink interface and hide implementationsDavid Robillard1-12/+19
2023-12-02Bring read/write interface closer to the C standardDavid Robillard1-3/+10
2023-12-02Simplify literal construction APIDavid Robillard1-3/+1
2023-12-02Simplify node construction APIDavid Robillard1-23/+53
2023-12-02Merge datatype/language into nodeDavid Robillard1-10/+8
This moves closer to the sord API, and is more convenient in most cases.
2023-12-02Make nodes opaqueDavid Robillard1-18/+30
2023-12-02Use more human-readable status codesDavid Robillard1-3/+3
2023-12-02Split up public API headerDavid Robillard1-1/+8
2023-12-02Rename SerdStyle to SerdWriterFlagsDavid Robillard1-6/+6
2023-12-02Add SerdBuffer type for mutable buffersDavid Robillard1-3/+3
This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks.
2023-12-02Use char* for strings in public APIDavid Robillard1-16/+13
The constant casting just makes user code a mess, for no benefit.
2023-05-03Remove test output file after executionDavid Robillard1-0/+1
2023-04-16Gracefully handle errors when writing textDavid Robillard1-0/+66
2023-04-05Fix potential memory leaks when a write is abortedDavid Robillard1-0/+49
Also clean up and simplify writer context management in general.
2023-04-02Improve TriG pretty-printing and remove trailing newlinesDavid Robillard1-2/+2
2022-08-31Adopt REUSE machine-readable licensing standardDavid Robillard1-15/+2
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