test(cli): the script helper's two spellings share one type
932c0517 pushed a helper whose branches were arrays of different
lengths; the three test binaries did not compile. A slice now.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
1 parent
932c05177f
commit
a8ce2e7d6c
3 files changed
+15
-21
No files matched your search
@@ -978,12 +978,10 @@ fn books_p2_served_cut_over_whole() {
|
|||||||
/// with the command's exit code as its own: util-linux's spelling on
|
/// with the command's exit code as its own: util-linux's spelling on
|
||||||
/// Linux, BSD's on macOS (no `-f`, no `-c`; the command after the file).
|
/// Linux, BSD's on macOS (no `-f`, no `-c`; the command after the file).
|
||||||
fn script_args(command: &str) -> Vec<String> {
|
fn script_args(command: &str) -> Vec<String> {
|
||||||
if cfg!(target_os = "macos") {
|
let args: &[&str] = if cfg!(target_os = "macos") {
|
||||||
["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
&["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
||||||
} else {
|
} else {
|
||||||
["-qefc", command, "/dev/null"]
|
&["-qefc", command, "/dev/null"]
|
||||||
}
|
};
|
||||||
.into_iter()
|
args.iter().map(|a| a.to_string()).collect()
|
||||||
.map(String::from)
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
@@ -2953,12 +2953,10 @@ fn token_check_says_where_the_token_file_stands_and_an_unreadable_one_is_said()
|
|||||||
/// with the command's exit code as its own: util-linux's spelling on
|
/// with the command's exit code as its own: util-linux's spelling on
|
||||||
/// Linux, BSD's on macOS (no `-f`, no `-c`; the command after the file).
|
/// Linux, BSD's on macOS (no `-f`, no `-c`; the command after the file).
|
||||||
fn script_args(command: &str) -> Vec<String> {
|
fn script_args(command: &str) -> Vec<String> {
|
||||||
if cfg!(target_os = "macos") {
|
let args: &[&str] = if cfg!(target_os = "macos") {
|
||||||
["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
&["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
||||||
} else {
|
} else {
|
||||||
["-qefc", command, "/dev/null"]
|
&["-qefc", command, "/dev/null"]
|
||||||
}
|
};
|
||||||
.into_iter()
|
args.iter().map(|a| a.to_string()).collect()
|
||||||
.map(String::from)
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
@@ -163,14 +163,12 @@ fn another_home_ignores_this_accounts_data_home() {
|
|||||||
/// with the command's exit code as its own: util-linux's spelling on
|
/// with the command's exit code as its own: util-linux's spelling on
|
||||||
/// Linux, BSD's on macOS (no `-f`, no `-c`; the command after the file).
|
/// Linux, BSD's on macOS (no `-f`, no `-c`; the command after the file).
|
||||||
fn script_args(command: &str) -> Vec<String> {
|
fn script_args(command: &str) -> Vec<String> {
|
||||||
if cfg!(target_os = "macos") {
|
let args: &[&str] = if cfg!(target_os = "macos") {
|
||||||
["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
&["-qeF", "/dev/null", "/bin/sh", "-c", command]
|
||||||
} else {
|
} else {
|
||||||
["-qefc", command, "/dev/null"]
|
&["-qefc", command, "/dev/null"]
|
||||||
}
|
};
|
||||||
.into_iter()
|
args.iter().map(|a| a.to_string()).collect()
|
||||||
.map(String::from)
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run `args` at a terminal (a pseudo-terminal, through `script`),
|
/// Run `args` at a terminal (a pseudo-terminal, through `script`),
|
||||||
|
|||||||
Reference in new issue
Block a user