Decouple usage of filepath from os2

This commit is contained in:
Feoramund
2025-03-21 19:14:15 -04:00
parent abe0c30837
commit 4e7f54c565
12 changed files with 42 additions and 39 deletions
+3 -3
View File
@@ -2,7 +2,6 @@ package tests_core_os_os2
import os "core:os/os2"
import "core:log"
import "core:path/filepath"
import "core:testing"
import "core:strings"
@@ -17,6 +16,7 @@ test_executable :: proc(t: ^testing.T) {
testing.expect_value(t, err, nil)
testing.expect(t, len(path) > 0)
testing.expect(t, filepath.is_abs(path))
testing.expectf(t, strings.contains(path, filepath.base(os.args[0])), "expected the executable path to contain the base of os.args[0] which is %q", filepath.base(os.args[0]))
testing.expect(t, os.is_absolute_path(path))
_, filename := os.split_path(os.args[0])
testing.expectf(t, strings.contains(path, filename), "expected the executable path to contain the base of os.args[0] which is %q", filename)
}