test: move all module tests to the test/ directory

This commit is contained in:
2025-11-01 10:12:18 +00:00
parent a68b9f7ba7
commit bd2fe50ec9
32 changed files with 5 additions and 5 deletions

25
test/io/rmdir.c Normal file
View File

@@ -0,0 +1,25 @@
#include <blue/io/directory.h>
int main(int argc, const char **argv)
{
if (argc < 2) {
return -1;
}
const char *path = argv[1];
b_directory *dir;
b_result result = b_directory_open(NULL, B_RV_PATH(path), 0, &dir);
if (b_result_is_error(result)) {
b_throw(result);
return -1;
}
result = b_directory_delete(dir);
if (b_result_is_error(result)) {
b_throw(result);
return -1;
}
return 0;
}