diff options
author | David Robillard <d@drobilla.net> | 2024-11-23 17:38:07 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-11-24 13:21:57 -0500 |
commit | eaeeee7a4a8adf1529d138209aa91351d5ba6f53 (patch) | |
tree | 90f434a06742f6399d38dc4c37c9ac992c251185 /test/lilv_test_utils.c | |
parent | 918270bb6b8122bdc41ead0c304363b85a795b29 (diff) | |
download | lilv-eaeeee7a4a8adf1529d138209aa91351d5ba6f53.tar.gz lilv-eaeeee7a4a8adf1529d138209aa91351d5ba6f53.tar.bz2 lilv-eaeeee7a4a8adf1529d138209aa91351d5ba6f53.zip |
Avoid using internal utility functions in tests
Diffstat (limited to 'test/lilv_test_utils.c')
-rw-r--r-- | test/lilv_test_utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lilv_test_utils.c b/test/lilv_test_utils.c index c3c47f0..3063449 100644 --- a/test/lilv_test_utils.c +++ b/test/lilv_test_utils.c @@ -189,3 +189,16 @@ lilv_create_temporary_directory(const char* pattern) return result; } + +char* +string_concat(const char* const head, const char* const tail) +{ + const size_t head_len = strlen(head); + const size_t tail_len = strlen(tail); + char* const result = (char*)calloc(1U, head_len + tail_len + 1U); + if (result) { + memcpy(result, head, head_len + 1U); + memcpy(result + head_len, tail, tail_len + 1U); + } + return result; +} |