1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

cut: use short and long args in two tests

This commit is contained in:
Daniel Hofstetter 2024-12-18 16:15:48 +01:00
parent 5ea4903632
commit 6224c374ae

View file

@ -257,20 +257,24 @@ fn test_no_such_file() {
#[test]
fn test_equal_as_delimiter() {
for arg in ["-d=", "--delimiter=="] {
new_ucmd!()
.args(&["-f", "2", "-d="])
.args(&["-f2", arg])
.pipe_in("--dir=./out/lib")
.succeeds()
.stdout_only("./out/lib\n");
}
}
#[test]
fn test_empty_string_as_delimiter() {
for arg in ["-d''", "--delimiter=", "--delimiter=''"] {
new_ucmd!()
.args(&["-f2", "--delimiter="])
.pipe_in("a=b\n")
.args(&["-f2", arg])
.pipe_in("a\0b\n")
.succeeds()
.stdout_only("a=b\n");
.stdout_only("b\n");
}
}
#[test]