2021-05-13 12:06:42 +02:00
|
|
|
import io
|
|
|
|
import os
|
|
|
|
|
|
|
|
fn test_cp() ? {
|
|
|
|
mut f := os.open(@FILE) or { panic(err) }
|
|
|
|
defer {
|
|
|
|
f.close()
|
|
|
|
}
|
|
|
|
mut r := io.new_buffered_reader(reader: f)
|
|
|
|
mut stdout := os.stdout()
|
2022-05-13 05:56:21 +02:00
|
|
|
io.cp(mut r, mut stdout)?
|
2021-05-13 12:06:42 +02:00
|
|
|
assert true
|
|
|
|
}
|