1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

df: remove trailing spaces in rightmost column (#3882)

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
jfinkels 2022-09-22 02:37:20 -04:00 committed by GitHub
parent 1e268b1a8f
commit dd0daa5e06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View file

@ -742,7 +742,7 @@ fn test_output_selects_columns() {
.args(&["--output=source"])
.succeeds()
.stdout_move_str();
assert_eq!(output.lines().next().unwrap().trim_end(), "Filesystem");
assert_eq!(output.lines().next().unwrap(), "Filesystem");
let output = new_ucmd!()
.args(&["--output=source,target"])
@ -801,7 +801,7 @@ fn test_output_file_all_filesystems() {
let mut lines = output.lines();
assert_eq!(lines.next().unwrap(), "File");
for line in lines {
assert_eq!(line, "- ");
assert_eq!(line, "-");
}
}
@ -821,7 +821,7 @@ fn test_output_file_specific_files() {
.succeeds()
.stdout_move_str();
let actual: Vec<&str> = output.lines().collect();
assert_eq!(actual, vec!["File", "a ", "b ", "c "]);
assert_eq!(actual, vec!["File", "a", "b", "c"]);
}
#[test]
@ -858,5 +858,5 @@ fn test_nonexistent_file() {
.args(&["--output=file", "does-not-exist", "."])
.fails()
.stderr_is("df: does-not-exist: No such file or directory\n")
.stdout_is("File\n. \n");
.stdout_is("File\n.\n");
}