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:
parent
5ea4903632
commit
6224c374ae
1 changed files with 14 additions and 10 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue