Drop the memory slider's language test

It set the launcher's process-wide language (Russian, Spanish) while other
launcher tests run in parallel and read tr(), and it checked a copy of
the view's match rather than the view.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-11-01 23:35:37 +01:00
1 parent 011bccf726
commit cfc5c627bb
1 file changed
-40
-40
View File
@@ -515,43 +515,3 @@ impl Launcher {
)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn memory_saved_message_follows_current_language() {
let msg = |saved: &MemorySaved| match saved {
MemorySaved::Ok(Some(mb)) => trf(
"Saved: the next Play uses at most {mb} MB.",
&[("mb", &mb.to_string())],
),
MemorySaved::Ok(None) => tr("Saved: no memory limit on the next Play.").to_string(),
MemorySaved::Invalid => {
tr("Type a number of MB like 4096, or 4gb, or leave it empty for no limit.")
.to_string()
}
MemorySaved::Error(e) => e.clone(),
};
let state = MemorySaved::Ok(None);
crate::i18n::set(crate::i18n::Language::English);
assert_eq!(msg(&state), "Saved: no memory limit on the next Play.");
crate::i18n::set(crate::i18n::Language::Russian);
assert_eq!(
msg(&state),
"Сохранено: при следующем запуске память не ограничена."
);
crate::i18n::set(crate::i18n::Language::Spanish);
assert_eq!(
msg(&state),
"Guardado: sin límite de memoria en la próxima partida."
);
crate::i18n::set(crate::i18n::Language::English);
}
}