mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
csplit: add test for precision syntax
This commit is contained in:
parent
0602c197ff
commit
5fbbfc75de
1 changed files with 15 additions and 0 deletions
|
@ -1342,3 +1342,18 @@ fn test_line_num_range_with_up_to_match3() {
|
|||
assert_eq!(at.read("xx01"), "");
|
||||
assert_eq!(at.read("xx02"), generate(10, 51));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn precision_format() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.args(&["numbers50.txt", "10", "--suffix-format", "%#6.3x"])
|
||||
.succeeds()
|
||||
.stdout_only("18\n123\n");
|
||||
|
||||
let count = glob(&at.plus_as_string("xx*"))
|
||||
.expect("there should be splits created")
|
||||
.count();
|
||||
assert_eq!(count, 2);
|
||||
assert_eq!(at.read("xx 000"), generate(1, 10));
|
||||
assert_eq!(at.read("xx 0x001"), generate(10, 51));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue