This commit is contained in:
Krzosa Karol
2025-03-27 11:44:52 +01:00
parent e8841153c6
commit 8a47f93b2f
21 changed files with 235 additions and 118 deletions

View File

@@ -8,13 +8,13 @@
fn void os_test(void) {
os_date_t local_time = os_local_time();
os_date_t universal_time = os_universal_time();
debugf("local_time = %S | universal_time = %S", os_format_date(tcx->temp, local_time), os_format_date(tcx->temp, universal_time));
debugf("OS local_time = %S | universal_time = %S", os_format_date(tcx->temp, local_time), os_format_date(tcx->temp, universal_time));
s8_t exe_dir = os_exe_dir(tcx->temp);
assert(exe_dir.str[exe_dir.len - 1] == '/');
s8_t exe = os_exe(tcx->temp);
s8_t cwd = os_cwd(tcx->temp);
assert(exe_dir.str[cwd.len - 1] == '/');
assert(cwd.str[cwd.len - 1] == '/');
assert(os_is_dir(exe_dir));
assert(os_is_file(exe));
assert(os_is_dir(cwd));
@@ -25,7 +25,11 @@ fn void os_test(void) {
assert(os_is_abs(exe));
assert(os_is_abs(cwd));
assert(!os_is_abs(s8_lit("../path/")));
debugf("%S %S %S", exe_dir, exe, cwd);
debugf("OS paths %S %S %S", exe_dir, exe, cwd);
s8_t file = os_read(tcx->temp, s8_lit("../.gitignore"));
assert(file.str != 0);
assert(file.len != 0);
}
fn void test_s8(void) {