diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2023-10-11 21:54:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-11 21:54:04 +0200 |
commit | f76b53d9694f3579cd5ce34cda47e52084db5f82 (patch) | |
tree | 00552fd9c60db729d40679bb65b2578f98053b08 /tests/by-util | |
parent | 0a7fe3cdc2580533560184f7101ab10ca84fedda (diff) | |
parent | a920464952df36e6c1797bc5dccf29f2976edf83 (diff) |
Merge pull request #5392 from zhitkoff/split-undocumented-opt-aliases
`split`: undocumented options aliases + help fix
Diffstat (limited to 'tests/by-util')
-rw-r--r-- | tests/by-util/test_split.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/by-util/test_split.rs b/tests/by-util/test_split.rs index ce80844cf..113c0fb87 100644 --- a/tests/by-util/test_split.rs +++ b/tests/by-util/test_split.rs @@ -1193,6 +1193,19 @@ fn test_numeric_suffix() { } #[test] +fn test_numeric_suffix_alias() { + let (at, mut ucmd) = at_and_ucmd!(); + ucmd.args(&["-n", "4", "--numeric=9", "threebytes.txt"]) + .succeeds() + .no_stdout() + .no_stderr(); + assert_eq!(at.read("x09"), "a"); + assert_eq!(at.read("x10"), "b"); + assert_eq!(at.read("x11"), "c"); + assert_eq!(at.read("x12"), ""); +} + +#[test] fn test_hex_suffix() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["-n", "4", "--hex-suffixes=9", "threebytes.txt"]) @@ -1206,6 +1219,19 @@ fn test_hex_suffix() { } #[test] +fn test_hex_suffix_alias() { + let (at, mut ucmd) = at_and_ucmd!(); + ucmd.args(&["-n", "4", "--hex=9", "threebytes.txt"]) + .succeeds() + .no_stdout() + .no_stderr(); + assert_eq!(at.read("x09"), "a"); + assert_eq!(at.read("x0a"), "b"); + assert_eq!(at.read("x0b"), "c"); + assert_eq!(at.read("x0c"), ""); +} + +#[test] fn test_numeric_suffix_no_equal() { new_ucmd!() .args(&["-n", "4", "--numeric-suffixes", "9", "threebytes.txt"]) |