summaryrefslogtreecommitdiff
path: root/std/wasi/testdata/std_io_stdin.rs
blob: 170d575c55536c1c5925a469005d5044e378ac85 (plain)
1
2
3
4
5
6
7
8
9
// { "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!")
}