mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Remove redundant test setup
One function calls setup twice, and the other one is not a test so should not be prefixed with "test_".
This commit is contained in:
parent
a139d204c0
commit
69380c6c92
2 changed files with 2 additions and 5 deletions
|
@ -14,8 +14,6 @@ fn test_string() {
|
||||||
use crate::tests::prelude::*;
|
use crate::tests::prelude::*;
|
||||||
use crate::wchar::prelude::*;
|
use crate::wchar::prelude::*;
|
||||||
|
|
||||||
let _cleanup = test_init();
|
|
||||||
|
|
||||||
// avoid 1.3k L!()'s
|
// avoid 1.3k L!()'s
|
||||||
macro_rules! test_cases {
|
macro_rules! test_cases {
|
||||||
([$($x:expr),*], $rc:expr, $out:expr) => { (vec![$(L!($x)),*], $rc, L!($out)) };
|
([$($x:expr),*], $rc:expr, $out:expr) => { (vec![$(L!($x)),*], $rc, L!($out)) };
|
||||||
|
|
|
@ -227,8 +227,7 @@ fn generate_history_lines(item_count: usize, idx: usize) -> Vec<WString> {
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test_history_races_pound_on_history(item_count: usize, idx: usize) {
|
fn pound_on_history(item_count: usize, idx: usize) {
|
||||||
let _cleanup = test_init();
|
|
||||||
// Called in child thread to modify history.
|
// Called in child thread to modify history.
|
||||||
let hist = History::new(L!("race_test"));
|
let hist = History::new(L!("race_test"));
|
||||||
let hist_lines = generate_history_lines(item_count, idx);
|
let hist_lines = generate_history_lines(item_count, idx);
|
||||||
|
@ -272,7 +271,7 @@ fn test_history_races() {
|
||||||
let mut children = Vec::with_capacity(RACE_COUNT);
|
let mut children = Vec::with_capacity(RACE_COUNT);
|
||||||
for i in 0..RACE_COUNT {
|
for i in 0..RACE_COUNT {
|
||||||
children.push(std::thread::spawn(move || {
|
children.push(std::thread::spawn(move || {
|
||||||
test_history_races_pound_on_history(ITEM_COUNT, i);
|
pound_on_history(ITEM_COUNT, i);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue