mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 05:57:46 +00:00
Merge branch 'master' into id_selinux_context
This commit is contained in:
commit
92bc647ac3
110 changed files with 655 additions and 595 deletions
|
@ -573,7 +573,8 @@ fn test_du_bytes() {
|
|||
#[cfg(all(
|
||||
not(target_vendor = "apple"),
|
||||
not(target_os = "windows"),
|
||||
not(target_os = "freebsd")
|
||||
not(target_os = "freebsd"),
|
||||
not(target_os = "linux")
|
||||
))]
|
||||
result.stdout_contains("21529\t./subdir\n");
|
||||
}
|
||||
|
|
|
@ -127,6 +127,15 @@ fn test_squeeze_complement() {
|
|||
.stdout_is("aaBcDcc");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_squeeze_complement_two_sets() {
|
||||
new_ucmd!()
|
||||
.args(&["-sc", "a", "_"])
|
||||
.pipe_in("test a aa with 3 ___ spaaaces +++") // spell-checker:disable-line
|
||||
.run()
|
||||
.stdout_is("_a_aa_aaa_");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_translate_and_squeeze() {
|
||||
new_ucmd!()
|
||||
|
@ -275,3 +284,11 @@ fn test_interpret_backslash_at_eol_literally() {
|
|||
.succeeds()
|
||||
.stdout_is("\\");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_more_than_2_sets() {
|
||||
new_ucmd!()
|
||||
.args(&["'abcdefgh'", "'a", "'b'"])
|
||||
.pipe_in("hello world")
|
||||
.fails();
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ fn test_normal_compare_env() {
|
|||
let whoami = whoami();
|
||||
if whoami == "nobody" {
|
||||
println!("test skipped:");
|
||||
return;
|
||||
} else if !is_ci() {
|
||||
new_ucmd!().succeeds().stdout_is(format!("{}\n", whoami));
|
||||
} else {
|
||||
|
|
|
@ -1065,7 +1065,7 @@ pub fn whoami() -> String {
|
|||
|
||||
/// Add prefix 'g' for `util_name` if not on linux
|
||||
#[cfg(unix)]
|
||||
pub fn host_name_for<'a>(util_name: &'a str) -> Cow<'a, str> {
|
||||
pub fn host_name_for(util_name: &str) -> Cow<str> {
|
||||
// In some environments, e.g. macOS/freebsd, the GNU coreutils are prefixed with "g"
|
||||
// to not interfere with the BSD counterparts already in `$PATH`.
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue