mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 09:48:03 +00:00
Merge pull request #3428 from cakebaker/fix_test_df_output_overridden
df: fix broken "test_df_output_overridden" test
This commit is contained in:
commit
346902e30b
1 changed files with 20 additions and 2 deletions
|
@ -101,9 +101,26 @@ fn test_df_output() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_df_output_overridden() {
|
fn test_df_output_overridden() {
|
||||||
let expected = if cfg!(target_os = "macos") {
|
let expected = if cfg!(target_os = "macos") {
|
||||||
"Filesystem Size Used Available Capacity Use% Mounted on "
|
vec![
|
||||||
|
"Filesystem",
|
||||||
|
"Size",
|
||||||
|
"Used",
|
||||||
|
"Available",
|
||||||
|
"Capacity",
|
||||||
|
"Use%",
|
||||||
|
"Mounted",
|
||||||
|
"on",
|
||||||
|
]
|
||||||
} else {
|
} else {
|
||||||
"Filesystem Size Used Available Use% Mounted on "
|
vec![
|
||||||
|
"Filesystem",
|
||||||
|
"Size",
|
||||||
|
"Used",
|
||||||
|
"Available",
|
||||||
|
"Use%",
|
||||||
|
"Mounted",
|
||||||
|
"on",
|
||||||
|
]
|
||||||
};
|
};
|
||||||
let output = new_ucmd!()
|
let output = new_ucmd!()
|
||||||
.arg("-hH")
|
.arg("-hH")
|
||||||
|
@ -111,6 +128,7 @@ fn test_df_output_overridden() {
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_move_str();
|
.stdout_move_str();
|
||||||
let actual = output.lines().take(1).collect::<Vec<&str>>()[0];
|
let actual = output.lines().take(1).collect::<Vec<&str>>()[0];
|
||||||
|
let actual = actual.split_whitespace().collect::<Vec<_>>();
|
||||||
assert_eq!(actual, expected);
|
assert_eq!(actual, expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue