aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/script/textinput.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/script/textinput.rs')
-rw-r--r--tests/unit/script/textinput.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/script/textinput.rs b/tests/unit/script/textinput.rs
index 1c364d5739a..4d59ebf2869 100644
--- a/tests/unit/script/textinput.rs
+++ b/tests/unit/script/textinput.rs
@@ -50,14 +50,14 @@ fn test_textinput_get_sorted_selection() {
let mut textinput = TextInput::new(Lines::Single, "abcdefg".to_owned(), DummyClipboardContext::new(""));
textinput.adjust_horizontal(2, Selection::NotSelected);
textinput.adjust_horizontal(2, Selection::Selected);
- let (begin, end) = textinput.get_sorted_selection();
+ let (begin, end) = textinput.get_sorted_selection().unwrap();
assert_eq!(begin.index, 2);
assert_eq!(end.index, 4);
textinput.clear_selection();
textinput.adjust_horizontal(-2, Selection::Selected);
- let (begin, end) = textinput.get_sorted_selection();
+ let (begin, end) = textinput.get_sorted_selection().unwrap();
assert_eq!(begin.index, 2);
assert_eq!(end.index, 4);
}