From b5651e3ac4a5e1802a467231433b309991ae5555 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Wed, 26 Aug 2020 16:44:41 -0700 Subject: [PATCH] Add test for empty span after hard-stop --- cursive-core/src/utils/lines/spans/tests.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cursive-core/src/utils/lines/spans/tests.rs b/cursive-core/src/utils/lines/spans/tests.rs index 62b30a8..6e484eb 100644 --- a/cursive-core/src/utils/lines/spans/tests.rs +++ b/cursive-core/src/utils/lines/spans/tests.rs @@ -8,8 +8,8 @@ fn input() -> StyledString { text.append(StyledString::styled("didn't", Effect::Bold)); text.append(StyledString::plain(" say ")); text.append(StyledString::styled("half", Effect::Italic)); - text.append(StyledString::plain(" the things people say I did.")); - text.append(StyledString::plain("\n")); + text.append(StyledString::plain(" the things people say I did.\n")); + text.append(StyledString::plain("")); text.append(StyledString::plain("\n")); text.append(StyledString::plain(" - A. Einstein")); @@ -18,6 +18,7 @@ fn input() -> StyledString { #[test] fn test_next_line_char() { + // From https://github.com/gyscos/cursive/issues/489 let d: Vec = vec![194, 133, 45, 127, 29, 127, 127]; let text = std::str::from_utf8(&d).unwrap(); let string = StyledString::plain(text);