Skip to content

Commit 67c0f0b

Browse files
committed
fs: add one test for mntent
1 parent 88b0342 commit 67c0f0b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/mntent.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ mod tests {
103103
assert!(mtab.is_ok());
104104
}
105105

106+
#[test]
107+
fn test_open_not_found() {
108+
let mtab = MountTable::open(c"/tmp/not_found", c"r");
109+
let mtab = mtab.err().unwrap();
110+
assert_eq!(mtab.kind(), std::io::ErrorKind::NotFound);
111+
}
112+
106113
#[test]
107114
fn test_iterable() {
108115
let mtab = MountTable::open(c"tests/mtab.txt", c"r").unwrap();

0 commit comments

Comments
 (0)