mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests ~ add is_ci()
test
This commit is contained in:
parent
51cb023cd7
commit
407d455b12
1 changed files with 7 additions and 0 deletions
|
@ -30,6 +30,13 @@ static ALREADY_RUN: &str = " you have already run this UCommand, if you want to
|
||||||
testing();";
|
testing();";
|
||||||
static MULTIPLE_STDIN_MEANINGLESS: &str = "Ucommand is designed around a typical use case of: provide args and input stream -> spawn process -> block until completion -> return output streams. For verifying that a particular section of the input stream is what causes a particular behavior, use the Command type directly.";
|
static MULTIPLE_STDIN_MEANINGLESS: &str = "Ucommand is designed around a typical use case of: provide args and input stream -> spawn process -> block until completion -> return output streams. For verifying that a particular section of the input stream is what causes a particular behavior, use the Command type directly.";
|
||||||
|
|
||||||
|
/// Test if the program are running under CI
|
||||||
|
pub fn is_ci() -> bool {
|
||||||
|
std::env::var("CI")
|
||||||
|
.unwrap_or(String::from("false"))
|
||||||
|
.eq_ignore_ascii_case("true")
|
||||||
|
}
|
||||||
|
|
||||||
/// Test if the program is running under WSL
|
/// Test if the program is running under WSL
|
||||||
// ref: <https://github.com/microsoft/WSL/issues/4555> @@ <https://archive.is/dP0bz>
|
// ref: <https://github.com/microsoft/WSL/issues/4555> @@ <https://archive.is/dP0bz>
|
||||||
// ToDO: test on WSL2 which likely doesn't need special handling; plan change to `is_wsl_1()` if WSL2 is less needy
|
// ToDO: test on WSL2 which likely doesn't need special handling; plan change to `is_wsl_1()` if WSL2 is less needy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue