From 5aed7766c9b32bb3326a9cbc607e8cc6224db586 Mon Sep 17 00:00:00 2001 From: mars Date: Sat, 15 Apr 2023 11:57:28 -0400 Subject: [PATCH] Add open_below_at_eof() test --- src/actions.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/actions.rs b/src/actions.rs index bb1c9a2..7caf118 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -213,6 +213,14 @@ mod tests { assert_eq!(state.cursor.column, 0); } + #[test] + fn open_below_at_eof() { + let mut state = state("test\n"); + state.cursor.line = 1; + open_below(&mut state); + assert_eq!(state.cursor.line, 1); + } + #[test] fn move_line_up_preserve_column() { let mut state = state("test\n\ntest\n");