summaryrefslogtreecommitdiff
path: root/source/tests/file.test.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/tests/file.test.c')
-rw-r--r--source/tests/file.test.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/source/tests/file.test.c b/source/tests/file.test.c
index 86a88e2..9ec51bf 100644
--- a/source/tests/file.test.c
+++ b/source/tests/file.test.c
@@ -4,7 +4,7 @@
#define KIT_TEST_FILE file
#include "../kit/kit_test.h"
-TEST("file path cache") {
+TEST("path cache") {
str_builder_t user = path_user(NULL);
str_builder_t cache = path_cache(NULL);
@@ -30,7 +30,7 @@ TEST("file path cache") {
DA_DESTROY(expected);
}
-TEST("file path normalize one") {
+TEST("path normalize one") {
str_t foo = SZ("foo/bar/../baz");
str_t foo_norm = SZ("foo" PATH_DELIM "baz");
@@ -41,7 +41,7 @@ TEST("file path normalize one") {
DA_DESTROY(bar);
}
-TEST("file path normalize two") {
+TEST("path normalize two") {
str_t foo = SZ("foo/bar/../../baz");
str_t foo_norm = SZ("baz");
@@ -52,7 +52,7 @@ TEST("file path normalize two") {
DA_DESTROY(bar);
}
-TEST("file path normalize parent") {
+TEST("path normalize parent") {
str_t foo = SZ("../baz");
str_t foo_norm = SZ(".." PATH_DELIM "baz");
@@ -63,7 +63,7 @@ TEST("file path normalize parent") {
DA_DESTROY(bar);
}
-TEST("file path normalize double parent") {
+TEST("path normalize double parent") {
str_t foo = SZ("foo/../../baz");
str_t foo_norm = SZ(".." PATH_DELIM "baz");
@@ -74,7 +74,7 @@ TEST("file path normalize double parent") {
DA_DESTROY(bar);
}
-TEST("file path normalize windows delim") {
+TEST("path normalize windows delim") {
str_t foo = SZ("foo\\bar\\..\\baz");
str_t foo_norm = SZ("foo" PATH_DELIM "baz");
@@ -85,7 +85,7 @@ TEST("file path normalize windows delim") {
DA_DESTROY(bar);
}
-TEST("file path join no delim") {
+TEST("path join no delim") {
str_t foo = SZ("foo");
str_t bar = SZ("bar");
str_t joined = SZ("foo" PATH_DELIM "bar");
@@ -97,7 +97,7 @@ TEST("file path join no delim") {
DA_DESTROY(foobar);
}
-TEST("file path join delim left") {
+TEST("path join delim left") {
str_t foo = SZ("foo/");
str_t bar = SZ("bar");
str_t joined = SZ("foo" PATH_DELIM "bar");
@@ -109,7 +109,7 @@ TEST("file path join delim left") {
DA_DESTROY(foobar);
}
-TEST("file path join delim right") {
+TEST("join delim right") {
str_t foo = SZ("foo");
str_t bar = SZ("/bar");
str_t joined = SZ("foo" PATH_DELIM "bar");
@@ -121,7 +121,7 @@ TEST("file path join delim right") {
DA_DESTROY(foobar);
}
-TEST("file path join delim both") {
+TEST("path join delim both") {
str_t foo = SZ("foo/");
str_t bar = SZ("/bar");
str_t joined = SZ("foo" PATH_DELIM "bar");
@@ -133,7 +133,7 @@ TEST("file path join delim both") {
DA_DESTROY(foobar);
}
-TEST("file path user") {
+TEST("path user") {
str_builder_t user = path_user(NULL);
REQUIRE(user.size > 0);
@@ -141,7 +141,7 @@ TEST("file path user") {
DA_DESTROY(user);
}
-TEST("file path index relative") {
+TEST("path index relative") {
str_t foobar = SZ("foo/bar");
str_t foo = SZ("foo");
str_t bar = SZ("bar");
@@ -151,7 +151,7 @@ TEST("file path index relative") {
REQUIRE(path_index(foobar, 2).size == 0);
}
-TEST("file path index absolute") {
+TEST("path index absolute") {
str_t foobar = SZ("/foo/bar");
str_t foo = SZ("foo");
str_t bar = SZ("bar");
@@ -161,7 +161,7 @@ TEST("file path index absolute") {
REQUIRE(path_index(foobar, 2).size == 0);
}
-TEST("file path index windows disk name") {
+TEST("path index windows disk name") {
str_t foobar = SZ("c:\\foo\\bar");
str_t disk = SZ("c:");
str_t foo = SZ("foo");
@@ -173,7 +173,7 @@ TEST("file path index windows disk name") {
REQUIRE(path_index(foobar, 3).size == 0);
}
-TEST("file path take relative") {
+TEST("path take relative") {
str_t foobar = SZ("foo/bar/");
str_t foo = SZ("foo");
str_t bar = SZ("foo/bar");
@@ -184,7 +184,7 @@ TEST("file path take relative") {
REQUIRE(AR_EQUAL(path_take(foobar, 2), bar_end));
}
-TEST("file path take absolute") {
+TEST("path take absolute") {
str_t foobar = SZ("/foo/bar");
str_t foo = SZ("/foo");
str_t bar = SZ("/foo/bar");
@@ -193,7 +193,7 @@ TEST("file path take absolute") {
REQUIRE(AR_EQUAL(path_take(foobar, 1), bar));
}
-TEST("file path take windows disk name") {
+TEST("path take windows disk name") {
str_t foobar = SZ("c:\\foo\\bar");
str_t disk = SZ("c:");
str_t foo = SZ("c:\\foo");
@@ -204,7 +204,7 @@ TEST("file path take windows disk name") {
REQUIRE(AR_EQUAL(path_take(foobar, 2), bar));
}
-TEST("file create folder") {
+TEST("create folder") {
str_t folder_name = SZ("test_folder");
REQUIRE_EQ(folder_create(folder_name), KIT_OK);
@@ -213,7 +213,7 @@ TEST("file create folder") {
REQUIRE_EQ(path_type(folder_name), PATH_NONE);
}
-TEST("file create folder recursive") {
+TEST("create folder recursive") {
REQUIRE_EQ(folder_create_recursive(
SZ("test_folder" PATH_DELIM "foo" PATH_DELIM "bar")),
KIT_OK);