1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 01:29:14 -05:00
denoland-deno/std/wasi/testdata/std_io_stdin.rs

10 lines
204 B
Rust
Raw Normal View History

// { "stdin": "Hello, stdin!" }
use std::io::Read;
fn main() {
let mut buffer = String::new();
assert!(std::io::stdin().read_to_string(&mut buffer).is_ok());
assert_eq!(buffer, "Hello, stdin!")
}