1
Fork 0
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:
zhitkoff 2023-10-11 12:13:22 -04:00
parent 0a7fe3cdc2
commit a920464952
2 changed files with 29 additions and 1 deletions

View file

@ -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!()