Skip to content

Commit 97a9e55

Browse files
author
Bernhard Specht
committed
Add breaking test
1 parent b4e13c2 commit 97a9e55

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
Blank line above!

src/tests.rs

+9
Original file line numberDiff line numberDiff line change
@@ -454,3 +454,12 @@ fn test_indexed() {
454454
);
455455
}
456456
}
457+
458+
#[test]
459+
fn test_file_with_blank_line_at_the_beginning() {
460+
let file = File::open("resources/file-with-blank-line-at-the-beginning").unwrap();
461+
let mut reader = EasyReader::new(file).unwrap();
462+
reader.eof();
463+
464+
while let Some(_line) = reader.prev_line().unwrap() {}
465+
}

0 commit comments

Comments
 (0)