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] #[test]
fn test_equal_as_delimiter() { fn test_equal_as_delimiter() {
new_ucmd!() for arg in ["-d=", "--delimiter=="] {
.args(&["-f", "2", "-d="]) new_ucmd!()
.pipe_in("--dir=./out/lib") .args(&["-f2", arg])
.succeeds() .pipe_in("--dir=./out/lib")
.stdout_only("./out/lib\n"); .succeeds()
.stdout_only("./out/lib\n");
}
} }
#[test] #[test]
fn test_empty_string_as_delimiter() { fn test_empty_string_as_delimiter() {
new_ucmd!() for arg in ["-d''", "--delimiter=", "--delimiter=''"] {
.args(&["-f2", "--delimiter="]) new_ucmd!()
.pipe_in("a=b\n") .args(&["-f2", arg])
.succeeds() .pipe_in("a\0b\n")
.stdout_only("a=b\n"); .succeeds()
.stdout_only("b\n");
}
} }
#[test] #[test]