diff -r d684ba9e2da0 -r d87fbe697f9b test/utils.c --- a/test/utils.c Fri Jan 09 14:52:34 2026 +0100 +++ b/test/utils.c Sat Jan 10 19:51:20 2026 +0100 @@ -87,6 +87,22 @@ } } +CX_TEST(test_util_resource_name) { + CX_TEST_DO { + const char *name = util_resource_name("test.txt"); + CX_TEST_ASSERT(!cx_strcmp(name, "test.txt")); + + name = util_resource_name("dir/file"); + CX_TEST_ASSERT(!cx_strcmp(name, "file")); + + name = util_resource_name("long/path/with/multiple/subdirs/hello"); + CX_TEST_ASSERT(!cx_strcmp(name, "hello")); + + name = util_resource_name("http://example.com/path/index.html"); + CX_TEST_ASSERT(!cx_strcmp(name, "index.html")); + } +} + CX_TEST(test_util_concat_path) { CX_TEST_DO { char *str = util_concat_path("", "");