Skip to content

Commit f87a445

Browse files
committed
fix test for command pallete
1 parent 8e8462b commit f87a445

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/command_pallete.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ mod tests {
136136

137137
#[test]
138138
fn state_test() {
139-
let mut state = CommandPalleteState::new();
140-
println!("{}", state.selected_line());
141-
state.input('c');
142-
state.input('h');
143-
state.input('a');
144-
state.input('r');
145-
println!("{}", state.selected_line());
139+
let mut state = CommandPalleteState::from(vec!["".to_owned()]);
140+
println!("{}", state.command());
141+
state.input_char('c');
142+
state.input_char('h');
143+
state.input_char('a');
144+
state.input_char('r');
145+
assert_eq!(state.command(), "char")
146146
}
147147
}

0 commit comments

Comments
 (0)