mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
parent
cae40ad673
commit
2d68230681
2 changed files with 11 additions and 2 deletions
8
vlib/os/open_and_read_from_file_test.js.v
Normal file
8
vlib/os/open_and_read_from_file_test.js.v
Normal file
|
@ -0,0 +1,8 @@
|
|||
import os
|
||||
|
||||
fn test_read_from_file() {
|
||||
mut buf := []u8{len: 10}
|
||||
f := os.open(@FILE)!
|
||||
n := f.read(mut &buf)!
|
||||
println(buf[..n])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue