Impement first testcase

This commit is contained in:
Riyyi
2026-08-17 16:57:29 +02:00
parent 9a8ba59d68
commit ed402102c4
2 changed files with 123 additions and 2 deletions
+19 -2
View File
@@ -1,8 +1,25 @@
package tests
import "core:os"
import "core:testing"
import "src:file"
@(test)
foo :: proc(t: ^testing.T) {
testing.expect(t, 1 + 1 == 2, "pass")
single_tiny_file :: proc(t: ^testing.T) {
// Arrange
create_file(t, "single_tiny_file", "hello world!")
// Act
wd, err := os.get_working_directory(context.allocator)
entries, err2 := file.list_dir_recursive_by_path(TEST_DIR, wd)
pack(t, 750)
delete_path(t, "")
read := read(t, "single_tiny_file")
// Assert
testing.expect_value(t, read, "hello world!")
}