Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
os
/
open_and_read_from_file_test.js.v
9
lines
·
8
sloc
·
161 bytes
·
a80bc2331450fc28c900097f8afafe173f161d27
Raw
1
// vtest build: present_node?
2
import
os
3
4
fn
test_read_from_file() {
5
mut
buf := []u8{len: 10}
6
f := os.open(@FILE)!
7
n := f.read(
mut
&buf)!
8
println(buf[..n])
9
}
10