1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 19:56:17 +00:00

Update message quoting and filename printing

This commit is contained in:
Jan Verbeek 2021-09-03 16:10:39 +02:00
parent 60df3c6b7c
commit 259f18fcab
91 changed files with 777 additions and 550 deletions

View file

@ -23,7 +23,7 @@ fn test_enter_chroot_fails() {
assert!(result
.stderr_str()
.starts_with("chroot: cannot chroot to jail: Operation not permitted (os error 1)"));
.starts_with("chroot: cannot chroot to 'jail': Operation not permitted (os error 1)"));
}
#[test]
@ -34,7 +34,7 @@ fn test_no_such_directory() {
ucmd.arg("a")
.fails()
.stderr_is("chroot: cannot change root directory to `a`: no such directory");
.stderr_is("chroot: cannot change root directory to 'a': no such directory");
}
#[test]

View file

@ -68,7 +68,7 @@ fn test_invalid_file() {
.arg(folder_name)
.fails()
.no_stdout()
.stderr_contains("cksum: 'asdf' No such file or directory");
.stderr_contains("cksum: asdf: No such file or directory");
// Then check when the file is of an invalid type
at.mkdir(folder_name);
@ -76,7 +76,7 @@ fn test_invalid_file() {
.arg(folder_name)
.fails()
.no_stdout()
.stderr_contains("cksum: 'asdf' Is a directory");
.stderr_contains("cksum: asdf: Is a directory");
}
// Make sure crc is correct for files larger than 32 bytes

View file

@ -531,7 +531,7 @@ fn test_keys_invalid_field() {
new_ucmd!()
.args(&["-k", "1."])
.fails()
.stderr_only("sort: failed to parse key `1.`: failed to parse character index ``: cannot parse integer from empty string");
.stderr_only("sort: failed to parse key '1.': failed to parse character index ``: cannot parse integer from empty string");
}
#[test]
@ -539,7 +539,7 @@ fn test_keys_invalid_field_option() {
new_ucmd!()
.args(&["-k", "1.1x"])
.fails()
.stderr_only("sort: failed to parse key `1.1x`: invalid option: `x`");
.stderr_only("sort: failed to parse key '1.1x': invalid option: `x`");
}
#[test]
@ -547,7 +547,7 @@ fn test_keys_invalid_field_zero() {
new_ucmd!()
.args(&["-k", "0.1"])
.fails()
.stderr_only("sort: failed to parse key `0.1`: field index can not be 0");
.stderr_only("sort: failed to parse key '0.1': field index can not be 0");
}
#[test]
@ -555,7 +555,7 @@ fn test_keys_invalid_char_zero() {
new_ucmd!()
.args(&["-k", "1.0"])
.fails()
.stderr_only("sort: failed to parse key `1.0`: invalid character index 0 for the start position of a field");
.stderr_only("sort: failed to parse key '1.0': invalid character index 0 for the start position of a field");
}
#[test]

View file

@ -59,7 +59,7 @@ fn test_invalid_file() {
at.mkdir("a");
ucmd.arg("a").fails().stderr_is("sum: 'a' Is a directory");
ucmd.arg("a").fails().stderr_is("sum: a: Is a directory");
}
#[test]
@ -68,5 +68,5 @@ fn test_invalid_metadata() {
ucmd.arg("b")
.fails()
.stderr_is("sum: 'b' No such file or directory");
.stderr_is("sum: b: No such file or directory");
}

View file

@ -320,7 +320,7 @@ fn test_invalid_utf8_integer_compare() {
cmd.run()
.status_code(2)
.stderr_is("test: invalid integer 'fo<66>o'");
.stderr_is("test: invalid integer $'fo\\x80o'");
let mut cmd = new_ucmd!();
cmd.raw.arg(arg);
@ -328,7 +328,7 @@ fn test_invalid_utf8_integer_compare() {
cmd.run()
.status_code(2)
.stderr_is("test: invalid integer 'fo<66>o'");
.stderr_is("test: invalid integer $'fo\\x80o'");
}
#[test]