1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: optimize os_windows.v

This commit is contained in:
yuyi
2020-02-24 03:46:13 +08:00
committed by GitHub
parent adb1d3f8c9
commit 9d2a60bb11
2 changed files with 17 additions and 12 deletions

View File

@ -51,6 +51,18 @@ fn test_open_file() {
os.rm(filename)
}
fn test_create_file() {
filename := './test1.txt'
hello := 'hello world!'
mut f := os.create(filename) or { panic(err)}
f.write(hello)
f.close()
assert hello.len == os.file_size(filename)
os.rm(filename)
}
fn test_write_and_read_string_to_file() {
filename := './test1.txt'
hello := 'hello world!'