add tests for non-existent hints
This commit is contained in:
parent
d2095fb533
commit
f6ca98a1f2
@ -99,7 +99,7 @@ impl<'a> AutoComplete<'a> {
|
||||
self.apply_hint(hint);
|
||||
}
|
||||
}
|
||||
_ => unreachable!(),
|
||||
Hint::None => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -113,6 +113,29 @@ fn multi() {
|
||||
]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn none() {
|
||||
// string that should give no hints
|
||||
let random = "qwert987gybhj";
|
||||
|
||||
ac_tester(&[
|
||||
Action::SetString(random),
|
||||
Action::AssertHint(""),
|
||||
Action::Move(Movement::Up),
|
||||
Action::AssertIndex(0),
|
||||
Action::AssertString(random),
|
||||
Action::AssertHint(""),
|
||||
Action::Move(Movement::Down),
|
||||
Action::AssertIndex(0),
|
||||
Action::AssertString(random),
|
||||
Action::AssertHint(""),
|
||||
Action::Move(Movement::Complete),
|
||||
Action::AssertString(random),
|
||||
Action::AssertHint(""),
|
||||
Action::AssertIndex(0),
|
||||
]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parens() {
|
||||
ac_tester(&[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user