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

23
test/io/streams.c Normal file
View File

@@ -0,0 +1,23 @@
#include <blue/core/stream.h>
#include <blue/io/file.h>
#include <blue/io/path.h>
#include <stdio.h>
int main(int argc, const char **argv)
{
b_file *dest;
b_path *path = b_path_create_from_cstr("data.txt");
b_result result = b_file_open(
NULL, path, B_FILE_WRITE_ONLY | B_FILE_CREATE, &dest);
if (b_result_is_error(result)) {
b_throw(result);
return -1;
}
size_t nr_read = 0;
b_stream_buffer *buf = b_stream_buffer_create_dynamic(1024);
b_stream_read_all_bytes_s(b_stdin, dest, buf, &nr_read);
printf("done. read %zu bytes total.\n", nr_read);
return 0;
}