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]
|
#[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]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue