mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
echo: update tests to check for ending newlines
This commit is contained in:
parent
42794e9f11
commit
e248730140
1 changed files with 6 additions and 6 deletions
|
@ -50,22 +50,22 @@ fn test_escape_hex() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_escape_short_hex() {
|
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]
|
#[test]
|
||||||
fn test_escape_no_hex() {
|
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]
|
#[test]
|
||||||
fn test_escape_one_slash() {
|
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]
|
#[test]
|
||||||
fn test_escape_one_slash_multi() {
|
fn test_escape_one_slash_multi() {
|
||||||
new_ucmd!().args(&["-e", "foo\\", "bar"]).succeeds().stdout_only("foo\\ bar");
|
new_ucmd!().args(&["-e", "foo\\", "bar"]).succeeds().stdout_only("foo\\ bar\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -85,12 +85,12 @@ fn test_escape_octal() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_escape_short_octal() {
|
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]
|
#[test]
|
||||||
fn test_escape_no_octal() {
|
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]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue