13 lines
346 B
Rust
13 lines
346 B
Rust
|
// ignore-windows: File handling is not implemented yet
|
||
|
// compile-flags: -Zmiri-disable-isolation
|
||
|
|
||
|
use std::fs::File;
|
||
|
use std::io::Read;
|
||
|
|
||
|
fn main() {
|
||
|
let mut file = File::open("./tests/hello.txt").unwrap();
|
||
|
let mut contents = String::new();
|
||
|
file.read_to_string(&mut contents).unwrap();
|
||
|
assert_eq!("Hello, World!\n", contents);
|
||
|
}
|