Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/by-util/test_base32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
//
#[cfg(target_os = "linux")]
#[cfg(unix)]
use uutests::at_and_ucmd;
use uutests::new_ucmd;

Expand Down Expand Up @@ -171,7 +171,7 @@ fn test_encode_large_input_is_buffered() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_base32_file_with_trailing_slash() {
let (at, mut ucmd) = at_and_ucmd!();
at.write("a", "b");
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_base64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// spell-checker:ignore unpadded, QUJD

#[cfg(target_os = "linux")]
#[cfg(unix)]
use uutests::at_and_ucmd;
use uutests::new_ucmd;

Expand Down Expand Up @@ -287,7 +287,7 @@ fn test_read_error() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_base64_file_with_trailing_slash() {
let (at, mut ucmd) = at_and_ucmd!();
at.write("a", "b");
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_cat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ fn test_cat_non_utf8_paths() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_appending_same_input_output() {
let (at, mut ucmd) = at_and_ucmd!();

Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_du.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,7 @@ fn test_du_safe_traversal_with_symlinks() {
assert!(!result.stdout_str().is_empty());
}
#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_du_inaccessible_directory() {
// tested by tests/du/no-x
let ts = TestScenario::new(util_name!());
Expand Down Expand Up @@ -2427,7 +2427,7 @@ fn test_du_hard_links_multiple_links_in_args() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_du_symlinks_multiple_links_in_args() {
let ts = TestScenario::new(util_name!());
let at = &ts.fixtures;
Expand Down
6 changes: 3 additions & 3 deletions tests/by-util/test_nl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ fn test_number_separator() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
#[cfg_attr(wasi_runner, ignore = "WASI: argv/filenames must be valid UTF-8")]
fn test_number_separator_non_utf8() {
use std::{ffi::OsString, os::unix::ffi::OsStringExt};
Expand Down Expand Up @@ -644,7 +644,7 @@ fn test_section_delimiter() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
#[cfg_attr(wasi_runner, ignore = "WASI: argv/filenames must be valid UTF-8")]
fn test_section_delimiter_non_utf8() {
use std::{ffi::OsString, os::unix::ffi::OsStringExt};
Expand Down Expand Up @@ -711,7 +711,7 @@ fn test_one_char_section_delimiter() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
#[cfg_attr(wasi_runner, ignore = "WASI: argv/filenames must be valid UTF-8")]
fn test_one_byte_section_delimiter() {
use std::{ffi::OsString, os::unix::ffi::OsStringExt};
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_seq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ fn test_separator_and_terminator() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_separator_non_utf8() {
use std::{ffi::OsString, os::unix::ffi::OsStringExt};

Expand All @@ -318,7 +318,7 @@ fn test_separator_non_utf8() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_terminator_non_utf8() {
use std::{ffi::OsString, os::unix::ffi::OsStringExt};

Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ fn test_files0_read_error() {
.stderr_only("sort: cannot read: .: Is a directory\n");
}

#[cfg(target_os = "linux")]
#[cfg(unix)]
#[test]
// Test for GNU tests/sort/sort-files0-from.pl "empty-non-regular"
fn test_files0_from_empty_non_regular() {
Expand Down
4 changes: 2 additions & 2 deletions tests/by-util/test_split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn test_invalid_arg() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(all(unix, not(target_os = "android")))]
fn test_split_to_non_seekable() {
let (at, mut ucmd) = at_and_ucmd!();
at.symlink_file("/dev/stdout", "xaa");
Expand Down Expand Up @@ -2093,7 +2093,7 @@ fn test_split_non_utf8_additional_suffix_is_byte_preserving() {
}

#[test]
#[cfg(target_os = "linux")] // To re-enable on Windows once I work out what goes wrong with it.
#[cfg(unix)] // To re-enable on Windows once I work out what goes wrong with it.
fn test_split_directory_already_exists() {
let (at, mut ucmd) = at_and_ucmd!();

Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_tac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ fn test_failed_write_is_reported() {
.stderr_is("tac: failed to write to stdout: No space left on device\n");
}

#[cfg(target_os = "linux")]
#[cfg(unix)]
#[test]
fn test_stdin_bad_tmpdir_fallback() {
// When TMPDIR is invalid, tac falls back to reading stdin directly into memory
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5074,7 +5074,7 @@ fn test_failed_write_is_reported_on_seekable_input() {
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_dev_zero() {
new_ucmd!()
.args(&["-c", "1", "/dev/zero"])
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ fn test_touch_set_date_without_leading_zeroes() {
/// expected by the old nix-based implementation. After switching to rustix
/// (which uses i64 `tv_sec` natively), this should succeed on all targets.
#[test]
#[cfg(target_os = "linux")]
#[cfg(unix)]
fn test_touch_set_date_year_zero() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "test_touch_year_zero";
Expand Down
1 change: 1 addition & 0 deletions tests/by-util/test_tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ fn test_truncate_with_set1_shorter_than_set2() {
fn test_truncate_applies_before_complement_with_class() {
new_ucmd!()
.args(&["-ct", "[:digit:]", "X"])
.ignore_stdin_write_error()
.pipe_in("A")
.fails()
.stderr_contains("when translating with complemented character classes,\nstring2 must map all characters in the domain to one");
Expand Down
Loading