From 69c9e44ef205a81c112dfb14d5f2e67e5ce9c300 Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Tue, 10 May 2022 23:41:44 -0400 Subject: update write-quit to wait for saves --- helix-term/tests/test/commands.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'helix-term/tests') diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index 1f1bd6a9..b7c0f7cc 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -8,7 +8,7 @@ use helix_term::application::Application; use super::*; -#[tokio::test] +#[tokio::test(flavor = "multi_thread")] async fn test_write_quit_fail() -> anyhow::Result<()> { let file = helpers::new_readonly_tempfile()?; @@ -16,6 +16,11 @@ async fn test_write_quit_fail() -> anyhow::Result<()> { &mut helpers::app_with_file(file.path())?, Some("ihello:wq"), Some(&|app| { + let mut docs: Vec<_> = app.editor.documents().collect(); + assert_eq!(1, docs.len()); + + let doc = docs.pop().unwrap(); + assert_eq!(Some(file.path()), doc.path().map(PathBuf::as_path)); assert_eq!(&Severity::Error, app.editor.get_status().unwrap().1); }), false, -- cgit v1.2.3-70-g09d2