aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/serd_test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 97966515..513344a3 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -457,12 +457,28 @@ main(void)
SerdNode* qualified = serd_env_qualify(env, foo_u);
assert(serd_node_equals(qualified, foo_c));
+
+ SerdEnv* env_copy = serd_env_copy(env);
+ assert(serd_env_equals(env, env_copy));
+
+ SerdNode* qualified2 = serd_env_expand(env_copy, foo_u);
+ assert(serd_node_equals(qualified, foo_c));
+ serd_node_free(qualified2);
+
+ serd_env_set_prefix_from_strings(
+ env_copy, "test", "http://example.org/test");
+ assert(!serd_env_equals(env, env_copy));
+
+ serd_env_set_prefix_from_strings(env, "test2", "http://example.org/test");
+ assert(!serd_env_equals(env, env_copy));
+
serd_node_free(qualified);
serd_node_free(foo_c);
serd_node_free(foo_u);
serd_node_free(b);
serd_node_free(pre);
serd_node_free(eg);
+ serd_env_free(env_copy);
// Test SerdReader and SerdWriter