aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-06-17 10:29:59 -0700
committerJoe Wilm <jwilm@users.noreply.github.com>2017-06-19 21:31:50 -0700
commitf12fd880fe0b60de050aa23097df59237452a40c (patch)
treee21e91157078de297356bb6e146ff3ea6a3e6288 /src/input.rs
parent6b081dcc95f08ac61e7f29033bbf0394ccff3472 (diff)
downloadalacritty-f12fd880fe0b60de050aa23097df59237452a40c.tar.gz
alacritty-f12fd880fe0b60de050aa23097df59237452a40c.zip
Update tests for new Selection API
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/input.rs b/src/input.rs
index 920e55f5..468e9ef3 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -496,6 +496,7 @@ mod tests {
use event::{Mouse, ClickState};
use config::{self, Config, ClickHandler};
use index::{Point, Side};
+ use selection::Selection;
use super::{Action, Binding, Processor};
@@ -510,7 +511,7 @@ mod tests {
struct ActionContext<'a> {
pub terminal: &'a mut Term,
- pub selection: Option<&'a mut Selection>,
+ pub selection: &'a mut Option<Selection>,
pub size_info: &'a SizeInfo,
pub mouse: &'a mut Mouse,
pub last_action: MultiClick,
@@ -533,11 +534,9 @@ mod tests {
// STUBBED
}
- fn clear_selection(&mut self) { }
-
- fn update_selection(&mut self, point: Point, side: Side) {
- self.selection.update(point, side);
- }
+ fn clear_selection(&mut self) {}
+ fn update_selection(&mut self, _point: Point, _side: Side) {}
+ fn simple_selection(&mut self, _point: Point, _side: Side) {}
fn semantic_selection(&mut self, _point: Point) {
// set something that we can check for here
@@ -578,16 +577,16 @@ mod tests {
padding_y: 0.0,
};
- use ::ansi::TermInfo;
-
let mut terminal = Term::new(&config, size);
let mut mouse = Mouse::default();
mouse.click_state = $initial_state;
+ let mut selection = None;
+
let context = ActionContext {
terminal: &mut terminal,
- selection: None,
+ selection: &mut selection,
mouse: &mut mouse,
size_info: &size,
last_action: MultiClick::None,