mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
split: undocumented options aliases + help fix
This commit is contained in:
parent
0a7fe3cdc2
commit
a920464952
2 changed files with 29 additions and 1 deletions
|
@ -1192,6 +1192,19 @@ fn test_numeric_suffix() {
|
|||
assert_eq!(at.read("x12"), "");
|
||||
}
|
||||
|
||||
#[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!();
|
||||
|
@ -1205,6 +1218,19 @@ fn test_hex_suffix() {
|
|||
assert_eq!(at.read("x0c"), "");
|
||||
}
|
||||
|
||||
#[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!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue