1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 19:36:16 +00:00

Merge branch 'main' into hotfix-mktemp

This commit is contained in:
Zaú Júlio 2023-03-02 15:31:39 -03:00 committed by GitHub
commit b41713c106
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 104 additions and 37 deletions

View file

@ -95,19 +95,33 @@ fn output_delimiter_nul() {
.stdout_only_fixture("ab_delimiter_nul.expected");
}
// even though (info) documentation suggests this is an option
// in latest GNU Coreutils comm, it actually is not.
// this test is essentially an alarm in case some well-intending
// developer implements it.
//marked as unimplemented as error message not set yet.
#[cfg_attr(not(feature = "test_unimplemented"), ignore)]
#[test]
fn zero_terminated() {
for param in ["-z", "--zero-terminated"] {
new_ucmd!()
.args(&[param, "a", "b"])
.fails()
.stderr_only("error to be defined");
.args(&[param, "a_nul", "b_nul"])
.succeeds()
.stdout_only_fixture("ab_nul.expected");
}
}
#[test]
fn zero_terminated_provided_multiple_times() {
for param in ["-z", "--zero-terminated"] {
new_ucmd!()
.args(&[param, param, param, "a_nul", "b_nul"])
.succeeds()
.stdout_only_fixture("ab_nul.expected");
}
}
#[test]
fn zero_terminated_with_total() {
for param in ["-z", "--zero-terminated"] {
new_ucmd!()
.args(&[param, "--total", "a_nul", "b_nul"])
.succeeds()
.stdout_only_fixture("ab_nul_total.expected");
}
}

BIN
tests/fixtures/comm/a_nul vendored Normal file

Binary file not shown.

BIN
tests/fixtures/comm/ab_nul.expected vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
tests/fixtures/comm/b_nul vendored Normal file

Binary file not shown.