diff options
author | David Robillard <d@drobilla.net> | 2021-06-30 16:15:15 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-06-30 16:19:59 -0400 |
commit | c1cae48eb3851239817c8cda5a8266815fb3173e (patch) | |
tree | c9ceda4eb0fa59b12a269b665c9822c719a1c80b /test/test_env.c | |
parent | 8113202c98888e092e1f4cdc2ee3ab34509d949c (diff) | |
download | serd-c1cae48eb3851239817c8cda5a8266815fb3173e.tar.gz serd-c1cae48eb3851239817c8cda5a8266815fb3173e.tar.bz2 serd-c1cae48eb3851239817c8cda5a8266815fb3173e.zip |
Make node qualify and expand functions tolerate a null Env
This is convenient in places where you don't necessarily need an Env, since
these methods will work the same as with an empty Env.
Diffstat (limited to 'test/test_env.c')
-rw-r--r-- | test/test_env.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_env.c b/test/test_env.c index b25bd9e2..48bc6c9b 100644 --- a/test/test_env.c +++ b/test/test_env.c @@ -50,8 +50,13 @@ test_env(void) SerdChunk prefix; SerdChunk suffix; + assert(!serd_env_qualify(NULL, &u, &u, &suffix)); + assert(serd_env_expand(NULL, &c, &prefix, &suffix)); assert(serd_env_expand(env, &b, &prefix, &suffix)); + SerdNode nxnode = serd_env_expand_node(NULL, &c); + assert(serd_node_equals(&nxnode, &SERD_NODE_NULL)); + SerdNode xnode = serd_env_expand_node(env, &SERD_NODE_NULL); assert(serd_node_equals(&xnode, &SERD_NODE_NULL)); |