mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
test_history_formats to adopt custom history directories
Simplifies this test by making it no longer serial.
This commit is contained in:
@@ -1848,9 +1848,10 @@ fn random_string(rng: &mut ThreadRng) -> WString {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_history() {
|
||||
let _cleanup = test_init();
|
||||
let tmpdir = fish_tempfile::new_dir().unwrap();
|
||||
let hist_dir = Some(osstr2wcstring(tmpdir.path()));
|
||||
|
||||
macro_rules! test_history_matches {
|
||||
($search:expr, $expected:expr) => {
|
||||
let expected: Vec<&wstr> = $expected;
|
||||
@@ -1877,7 +1878,7 @@ macro_rules! test_history_matches {
|
||||
let nocase = SearchFlags::IGNORE_CASE;
|
||||
|
||||
// Populate a history.
|
||||
let history = History::with_name(L!("test_history"));
|
||||
let history = History::new(L!("test_history"), hist_dir);
|
||||
history.clear();
|
||||
for s in items {
|
||||
history.add_commandline(s.to_owned());
|
||||
|
||||
Reference in New Issue
Block a user