Skip to content

Commit 546dc41

Browse files
committed
Add failing test
1 parent e69a02e commit 546dc41

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/fd.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#[cfg(test)]
2-
mod tests;
3-
41
use std::cmp;
52
use std::io::{self, IoSlice, IoSliceMut, Read};
63
use std::mem;

src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ mod cvt;
55

66
#[cfg(test)]
77
mod tests {
8+
use crate::fs;
9+
810
#[test]
911
fn it_works() {
10-
assert_eq!(2 + 2, 4);
12+
//let f = fs::File::create("/tmp/a").unwrap(); // TODO: need cross-platform fs.rs, https://github.com/rust-lang/rust/blob/master/library/std/src/fs.rs
13+
// TODO: the trait `From<&str>` is not implemented for `&Path`
14+
let f = fs::File::open("/etc/motd", &fs::OpenOptions::new()).unwrap();
15+
println!("f = {:?}", f);
1116
}
1217
}

0 commit comments

Comments
 (0)