mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
seq: change default value for -t and remove dubious escape sequences
GNU seq does not support -t, but always outputs a newline at the end. Therefore, our default for -t should be \n. Also removes support for escape sequences (interpreting a literal "\n" as a newline). This is not what GNU seq is doing, and unexpected.
This commit is contained in:
parent
c78cc65421
commit
4cf18e96f3
2 changed files with 22 additions and 22 deletions
|
@ -28,6 +28,18 @@ fn test_separator_and_terminator() {
|
|||
.args(&["-s", ",", "-t", "!", "2", "6"])
|
||||
.run()
|
||||
.stdout_is("2,3,4,5,6!");
|
||||
new_ucmd!()
|
||||
.args(&["-s", ",", "2", "6"])
|
||||
.run()
|
||||
.stdout_is("2,3,4,5,6\n");
|
||||
new_ucmd!()
|
||||
.args(&["-s", "\n", "2", "6"])
|
||||
.run()
|
||||
.stdout_is("2\n3\n4\n5\n6\n");
|
||||
new_ucmd!()
|
||||
.args(&["-s", "\\n", "2", "6"])
|
||||
.run()
|
||||
.stdout_is("2\\n3\\n4\\n5\\n6\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue