mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
Fix test_history_path_detection panic: call test_init()
test_history_path_detection calls add_pending_with_file_detection(), which spawns a thread pool task via ThreadPool::perform(). This requires threads::init() to have been called, otherwise assert_is_background_thread() panics. Add the missing test_init() call, matching other tests that use subsystems requiring initialization. Closes #12604
This commit is contained in:
committed by
Johannes Altmanninger
parent
68453843d4
commit
90cbfd288e
@@ -1810,6 +1810,7 @@ mod tests {
|
||||
use crate::env::{EnvMode, EnvSetMode, EnvStack};
|
||||
use crate::fs::{LockedFile, WriteMethod};
|
||||
use crate::prelude::*;
|
||||
use crate::tests::prelude::test_init;
|
||||
use fish_build_helper::workspace_root;
|
||||
use fish_wcstringutil::{
|
||||
string_prefixes_string, string_prefixes_string_case_insensitive, wcs2bytes,
|
||||
@@ -2292,6 +2293,7 @@ fn test_history_merge() {
|
||||
|
||||
#[test]
|
||||
fn test_history_path_detection() {
|
||||
let _cleanup = test_init();
|
||||
// Regression test for #7582.
|
||||
// Temporary directory for the history files.
|
||||
let hist_tmpdir = fish_tempfile::new_dir().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user