mirror of
https://github.com/storytold/gridcraft.git
synced 2026-12-02 10:37:05 -06:00
nightly-tests: rustfmt the launcher fixture
This commit is contained in:
@@ -668,10 +668,8 @@ mod launch_separator_tests {
|
||||
|
||||
/// The argv the Launcher starts a nightly with, extended by `tail`, as the start then reads it.
|
||||
fn launcher_argv(tail: &[&str]) -> Vec<String> {
|
||||
let mut argv: Vec<std::ffi::OsString> = ["--launch-profile", "nightly-v1", "--profile-root", launcher_root(), "--"]
|
||||
.iter()
|
||||
.map(std::ffi::OsString::from)
|
||||
.collect();
|
||||
let mut argv: Vec<std::ffi::OsString> =
|
||||
["--launch-profile", "nightly-v1", "--profile-root", launcher_root(), "--"].iter().map(std::ffi::OsString::from).collect();
|
||||
argv.extend(tail.iter().map(std::ffi::OsString::from));
|
||||
launch_profile::parse(argv).unwrap().args.iter().map(|a| a.to_string_lossy().into_owned()).collect()
|
||||
}
|
||||
@@ -679,10 +677,8 @@ mod launch_separator_tests {
|
||||
#[test]
|
||||
fn the_other_platforms_root_spelling_is_refused_as_relative() {
|
||||
let foreign = if cfg!(windows) { "/nightly-data/profiles/gridcraft" } else { r"C:\NightlyData\profiles\gridcraft" };
|
||||
let argv: Vec<std::ffi::OsString> = ["--launch-profile", "nightly-v1", "--profile-root", foreign, "--"]
|
||||
.iter()
|
||||
.map(std::ffi::OsString::from)
|
||||
.collect();
|
||||
let argv: Vec<std::ffi::OsString> =
|
||||
["--launch-profile", "nightly-v1", "--profile-root", foreign, "--"].iter().map(std::ffi::OsString::from).collect();
|
||||
assert!(launch_profile::parse(argv).is_err(), "a root that is not absolute on this platform must be refused");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user