mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #1356 from Arcterus/echo-locked-stdout
echo: write using locked stdout
This commit is contained in:
commit
01966e8aab
2 changed files with 56 additions and 19 deletions
|
@ -50,17 +50,22 @@ fn test_escape_hex() {
|
|||
|
||||
#[test]
|
||||
fn test_escape_short_hex() {
|
||||
new_ucmd!().args(&["-e", "foo\\xa bar"]).succeeds().stdout_only("foo\n bar");
|
||||
new_ucmd!().args(&["-e", "foo\\xa bar"]).succeeds().stdout_only("foo\n bar\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_escape_no_hex() {
|
||||
new_ucmd!().args(&["-e", "foo\\x bar"]).succeeds().stdout_only("foo\\x bar");
|
||||
new_ucmd!().args(&["-e", "foo\\x bar"]).succeeds().stdout_only("foo\\x bar\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_escape_one_slash() {
|
||||
new_ucmd!().args(&["-e", "foo\\ bar"]).succeeds().stdout_only("foo\\ bar");
|
||||
new_ucmd!().args(&["-e", "foo\\ bar"]).succeeds().stdout_only("foo\\ bar\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_escape_one_slash_multi() {
|
||||
new_ucmd!().args(&["-e", "foo\\", "bar"]).succeeds().stdout_only("foo\\ bar\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -80,12 +85,12 @@ fn test_escape_octal() {
|
|||
|
||||
#[test]
|
||||
fn test_escape_short_octal() {
|
||||
new_ucmd!().args(&["-e", "foo\\040bar"]).succeeds().stdout_only("foo bar");
|
||||
new_ucmd!().args(&["-e", "foo\\040bar"]).succeeds().stdout_only("foo bar\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_escape_no_octal() {
|
||||
new_ucmd!().args(&["-e", "foo\\0 bar"]).succeeds().stdout_only("foo\\0 bar");
|
||||
new_ucmd!().args(&["-e", "foo\\0 bar"]).succeeds().stdout_only("foo\\0 bar\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue