]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/file_read.rs
93c986393b02efb9c8fd0567b852678bc07c5e82
[rust.git] / tests / run-pass / file_read.rs
1 // ignore-windows: File handling is not implemented yet
2 // compile-flags: -Zmiri-disable-isolation
3
4 use std::fs::File;
5 use std::io::Read;
6
7 fn main() {
8     let mut file = File::open("./tests/hello.txt").unwrap();
9     let mut contents = String::new();
10     file.read_to_string(&mut contents).unwrap();
11     assert_eq!("Hello, World!\n", contents);
12 }