From 0d7f99a21f0eb0e560d48e7db1890e024add76cd Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Tue, 19 Apr 2022 07:46:00 +0200 Subject: [PATCH] df: fix broken "test_df_output_overridden" test --- tests/by-util/test_df.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/by-util/test_df.rs b/tests/by-util/test_df.rs index 859f7b5cc..223dc4efc 100644 --- a/tests/by-util/test_df.rs +++ b/tests/by-util/test_df.rs @@ -101,9 +101,26 @@ fn test_df_output() { #[test] fn test_df_output_overridden() { 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 { - "Filesystem Size Used Available Use% Mounted on " + vec![ + "Filesystem", + "Size", + "Used", + "Available", + "Use%", + "Mounted", + "on", + ] }; let output = new_ucmd!() .arg("-hH") @@ -111,6 +128,7 @@ fn test_df_output_overridden() { .succeeds() .stdout_move_str(); let actual = output.lines().take(1).collect::>()[0]; + let actual = actual.split_whitespace().collect::>(); assert_eq!(actual, expected); }