mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
join: make autoformat actually construct a format
Makes the -o auto option construct a format at initialization, rather than try to handle it as a special case when printing lines. Fixes bugs when combined with -e, especially when combined with -a.
This commit is contained in:
parent
2bd556e252
commit
575fbd4cb7
2 changed files with 47 additions and 24 deletions
|
@ -227,6 +227,19 @@ fn autoformat() {
|
|||
.pipe_in("1 x y z\n2 p")
|
||||
.succeeds()
|
||||
.stdout_only("1 x y z a\n2 p b\n");
|
||||
|
||||
new_ucmd!()
|
||||
.arg("-")
|
||||
.arg("fields_2.txt")
|
||||
.arg("-a")
|
||||
.arg("1")
|
||||
.arg("-o")
|
||||
.arg("auto")
|
||||
.arg("-e")
|
||||
.arg(".")
|
||||
.pipe_in("1 x y z\n2 p\n99 a b\n")
|
||||
.succeeds()
|
||||
.stdout_only("1 x y z a\n2 p . . b\n99 a b . .\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue