@@ -0,0 +1,24 @@
1+use helix_term::{application::Application, args::Args, config::Config};
2+use helix_view::current;
4+use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
8+ let args = Args::default();
9+ let config = Config::default();
10+ let mut app = Application::new(args, config).unwrap();
12+ let inputs = &['i', 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'];
14+ for input in inputs {
15+ // TODO: use input.parse::<KeyEvent>
16+ app.handle_terminal_events(Ok(Event::Key(KeyEvent {
17+ code: KeyCode::Char(*input),
18+ modifiers: KeyModifiers::NONE,
22+ let (_, doc) = current!(app.editor);
23+ assert_eq!(doc.text(), "hello world\n");