vfs rewrite lol fml
This commit is contained in:
10
Test/HyperionOS-units/usr/lib/hunit/file.unit
Normal file
10
Test/HyperionOS-units/usr/lib/hunit/file.unit
Normal file
@@ -0,0 +1,10 @@
|
||||
local fd = syscall.VFS_open("/tmp/hunit/testfile.txt", "w")
|
||||
syscall.VFS_write(fd, "This is a test file")
|
||||
syscall.VFS_close(fd)
|
||||
local fd = syscall.VFS_open("/tmp/hunit/testfile.txt", "r")
|
||||
local text = syscall.VFS_read(fd, 64)
|
||||
syscall.VFS_close(fd)
|
||||
|
||||
if text~="This is a test file" then
|
||||
error("File failed to write/read")
|
||||
end
|
||||
Reference in New Issue
Block a user