diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-07-18 07:19:27 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-07-18 07:19:27 +0300 |
commit | 5f8db9fb7fe82e00fa7310ef40d38d1ae734b9af (patch) | |
tree | d9c80622b070e909433e57c51325d2330f66ecd9 /src/tests | |
parent | 216f874e90a069228f262d36bbd2e3e3cdbf9ae6 (diff) | |
download | arching-kaos-tools-5f8db9fb7fe82e00fa7310ef40d38d1ae734b9af.tar.gz arching-kaos-tools-5f8db9fb7fe82e00fa7310ef40d38d1ae734b9af.tar.bz2 arching-kaos-tools-5f8db9fb7fe82e00fa7310ef40d38d1ae734b9af.zip |
ak_fs_create_dir_for_hash rough implementation (leaky leaky)
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_akfs_mkdir.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/tests/test_akfs_mkdir.c b/src/tests/test_akfs_mkdir.c new file mode 100644 index 0000000..2ef86b3 --- /dev/null +++ b/src/tests/test_akfs_mkdir.c @@ -0,0 +1,38 @@ +#include <stdio.h> +#include <akfs.h> + +void test_non_hash_string(){ + char *path = "tes"; + int ec = ak_fs_create_dir_for_hash(path); + printf("mkdir return code: %d\n", ec); + path = "tes/t"; + ec = ak_fs_create_dir_for_hash(path); + printf("mkdir return code: %d\n", ec); +} + +void test_hash_string(){ + char *path = "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff"; + int ec = ak_fs_create_dir_for_hash(path); + printf("mkdir return code: %d\n", ec); +} + +void test_hash_string2(){ + char *path = "ee2ab0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff"; + int ec = ak_fs_create_dir_for_hash(path); + printf("mkdir return code: %d\n", ec); +} + +void test_hash_string3(){ + char *path = "ee2ab0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a800"; + int ec = ak_fs_create_dir_for_hash(path); + printf("mkdir return code: %d\n", ec); +} + +int main() +{ + test_non_hash_string(); + test_hash_string(); + test_hash_string2(); + test_hash_string3(); + return 0; +} |