diff options
author | Skyler Hawthorne | 2022-05-01 00:44:54 +0000 |
---|---|---|
committer | Skyler Hawthorne | 2022-06-19 03:54:03 +0000 |
commit | 07fc80aece221233b4a986b0c5a03e2056cc1307 (patch) | |
tree | 5165c2e33265cefa10081b77fb6436b4f08c8d26 /helix-term/tests/integration/commands.rs | |
parent | ee705dcb3363aeb197f6125ab2f8285782333010 (diff) |
tests for serialized writes
Diffstat (limited to 'helix-term/tests/integration/commands.rs')
-rw-r--r-- | helix-term/tests/integration/commands.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/helix-term/tests/integration/commands.rs b/helix-term/tests/integration/commands.rs new file mode 100644 index 00000000..ec60ac96 --- /dev/null +++ b/helix-term/tests/integration/commands.rs @@ -0,0 +1,25 @@ +use helix_core::diagnostic::Severity; +use helix_term::application::Application; + +use super::*; + +#[tokio::test] +async fn test_write_quit_fail() -> anyhow::Result<()> { + test_key_sequence( + &mut Application::new( + Args { + files: vec![(PathBuf::from("/foo"), Position::default())], + ..Default::default() + }, + Config::default(), + )?, + "ihello<esc>:wq<ret>", + Some(&|app| { + assert_eq!(&Severity::Error, app.editor.get_status().unwrap().1); + }), + None, + ) + .await?; + + Ok(()) +} |