mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tests: Adjust some tests to use improved UChild. test_tac: Ignore pipe tests on windows.
Summary: * Disable test_retry6 on android because of intermittent failures * Use wait() instead of wait_with_output in test_cat, test_cp, test_sort * tests/sort: Simplify usage of test_sigpipe_panic * Fix tests in test_tee. tests/tac: There was a change in the `tests/common/util.rs` test api concerning piped input which may have revealed a bug in the implementation of tac. Please see also https://github.com/uutils/coreutils/pull/4136
This commit is contained in:
parent
4f54eedb74
commit
4a2ced5940
7 changed files with 40 additions and 17 deletions
|
@ -7,6 +7,8 @@ fn test_invalid_arg() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_stdin_default() {
|
||||
new_ucmd!()
|
||||
.pipe_in("100\n200\n300\n400\n500")
|
||||
|
@ -15,6 +17,8 @@ fn test_stdin_default() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_stdin_non_newline_separator() {
|
||||
new_ucmd!()
|
||||
.args(&["-s", ":"])
|
||||
|
@ -24,6 +28,8 @@ fn test_stdin_non_newline_separator() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_stdin_non_newline_separator_before() {
|
||||
new_ucmd!()
|
||||
.args(&["-b", "-s", ":"])
|
||||
|
@ -76,11 +82,14 @@ fn test_invalid_input() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(windows))] // FIXME: https://github.com/uutils/coreutils/issues/4204
|
||||
fn test_no_line_separators() {
|
||||
new_ucmd!().pipe_in("a").succeeds().stdout_is("a");
|
||||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_before_trailing_separator_no_leading_separator() {
|
||||
new_ucmd!()
|
||||
.arg("-b")
|
||||
|
@ -90,6 +99,8 @@ fn test_before_trailing_separator_no_leading_separator() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_before_trailing_separator_and_leading_separator() {
|
||||
new_ucmd!()
|
||||
.arg("-b")
|
||||
|
@ -99,6 +110,8 @@ fn test_before_trailing_separator_and_leading_separator() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_before_leading_separator_no_trailing_separator() {
|
||||
new_ucmd!()
|
||||
.arg("-b")
|
||||
|
@ -108,6 +121,8 @@ fn test_before_leading_separator_no_trailing_separator() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_before_no_separator() {
|
||||
new_ucmd!()
|
||||
.arg("-b")
|
||||
|
@ -117,11 +132,15 @@ fn test_before_no_separator() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_before_empty_file() {
|
||||
new_ucmd!().arg("-b").pipe_in("").succeeds().stdout_is("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_multi_char_separator() {
|
||||
new_ucmd!()
|
||||
.args(&["-s", "xx"])
|
||||
|
@ -131,6 +150,8 @@ fn test_multi_char_separator() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_multi_char_separator_overlap() {
|
||||
// The right-most pair of "x" characters in the input is treated as
|
||||
// the only line separator. That is, "axxx" is interpreted as having
|
||||
|
@ -161,6 +182,8 @@ fn test_multi_char_separator_overlap() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_multi_char_separator_overlap_before() {
|
||||
// With the "-b" option, the line separator is assumed to be at the
|
||||
// beginning of the line. In this case, That is, "axxx" is
|
||||
|
@ -203,6 +226,8 @@ fn test_multi_char_separator_overlap_before() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_null_separator() {
|
||||
new_ucmd!()
|
||||
.args(&["-s", ""])
|
||||
|
@ -212,6 +237,8 @@ fn test_null_separator() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_regex() {
|
||||
new_ucmd!()
|
||||
.args(&["-r", "-s", "[xyz]+"])
|
||||
|
@ -240,6 +267,8 @@ fn test_regex() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
// FIXME: See https://github.com/uutils/coreutils/issues/4204
|
||||
#[cfg(not(windows))]
|
||||
fn test_regex_before() {
|
||||
new_ucmd!()
|
||||
.args(&["-b", "-r", "-s", "[xyz]+"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue