parent
b8b2c2ca70
commit
9b866ad9e8
|
@ -68,9 +68,7 @@ pub fn get_args(tagged_filterer: bool) -> Result<ArgMatches<'static>> {
|
|||
.short("s")
|
||||
.long("signal")
|
||||
.takes_value(true)
|
||||
.value_name("signal")
|
||||
.default_value("SIGTERM")
|
||||
.hidden(cfg!(windows)))
|
||||
.value_name("signal"))
|
||||
.arg(Arg::with_name("kill")
|
||||
.help_heading(Some(OPTSET_BEHAVIOUR))
|
||||
.hidden(true)
|
||||
|
|
|
@ -279,48 +279,33 @@ fn os_split_leading() {
|
|||
#[test]
|
||||
fn os_strip_none() {
|
||||
let os = OsString::from("abc");
|
||||
assert_eq!(
|
||||
os_strip_prefix(os, b'.'),
|
||||
OsString::from("abc")
|
||||
);
|
||||
assert_eq!(os_strip_prefix(os, b'.'), OsString::from("abc"));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn os_strip_left() {
|
||||
let os = OsString::from(".abc");
|
||||
assert_eq!(
|
||||
os_strip_prefix(os, b'.'),
|
||||
OsString::from("abc")
|
||||
);
|
||||
assert_eq!(os_strip_prefix(os, b'.'), OsString::from("abc"));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn os_strip_not_right() {
|
||||
let os = OsString::from("abc.");
|
||||
assert_eq!(
|
||||
os_strip_prefix(os, b'.'),
|
||||
OsString::from("abc.")
|
||||
);
|
||||
assert_eq!(os_strip_prefix(os, b'.'), OsString::from("abc."));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn os_strip_only_left() {
|
||||
let os = OsString::from(".abc.");
|
||||
assert_eq!(
|
||||
os_strip_prefix(os, b'.'),
|
||||
OsString::from("abc.")
|
||||
);
|
||||
assert_eq!(os_strip_prefix(os, b'.'), OsString::from("abc."));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[test]
|
||||
fn os_strip_only_once() {
|
||||
let os = OsString::from("..abc");
|
||||
assert_eq!(
|
||||
os_strip_prefix(os, b'.'),
|
||||
OsString::from(".abc")
|
||||
);
|
||||
assert_eq!(os_strip_prefix(os, b'.'), OsString::from(".abc"));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
source: cli/tests/help.rs
|
||||
assertion_line: 16
|
||||
expression: "String::from_utf8(output.stdout).unwrap()"
|
||||
|
||||
---
|
||||
|
@ -39,8 +40,7 @@ OPTIONS:
|
|||
-w, --watch <path>... Watch a specific file or directory
|
||||
--force-poll <interval> Force polling mode (interval in milliseconds)
|
||||
--shell <shell> Use a different shell, or `none`. E.g. --shell=bash
|
||||
-s, --signal <signal> Specify the signal to send when using --on-busy-update=signal [default:
|
||||
SIGTERM]
|
||||
-s, --signal <signal> Specify the signal to send when using --on-busy-update=signal
|
||||
|
||||
ARGS:
|
||||
<command>... Command to execute
|
||||
|
|
|
@ -40,6 +40,7 @@ OPTIONS:
|
|||
--force-poll <interval> Force polling mode (interval in milliseconds)
|
||||
--shell <shell> Use a different shell, or `none`. Try --shell=powershell, which will become
|
||||
the default in 2.0.
|
||||
-s, --signal <signal> Specify the signal to send when using --on-busy-update=signal
|
||||
|
||||
ARGS:
|
||||
<command>... Command to execute
|
||||
|
|
Loading…
Reference in New Issue