From c0cd0177064695697ba24b29689057618c8faa43 Mon Sep 17 00:00:00 2001 From: Jeffrey Finkelstein Date: Mon, 21 Feb 2022 20:50:55 -0500 Subject: [PATCH] tests: update test_df.rs to use --output argument --- tests/by-util/test_df.rs | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/tests/by-util/test_df.rs b/tests/by-util/test_df.rs index 5d99b648b..896a55931 100644 --- a/tests/by-util/test_df.rs +++ b/tests/by-util/test_df.rs @@ -43,21 +43,14 @@ fn test_df_output() { /// Test that the order of rows in the table does not change across executions. #[test] fn test_order_same() { - // TODO When #3057 is resolved, we should just use - // - // new_ucmd!().arg("--output=source").succeeds().stdout_move_str(); - // - // instead of parsing the entire `df` table as a string. - let output1 = new_ucmd!().succeeds().stdout_move_str(); - let output2 = new_ucmd!().succeeds().stdout_move_str(); - let output1: Vec = output1 - .lines() - .map(|l| String::from(l.split_once(' ').unwrap().0)) - .collect(); - let output2: Vec = output2 - .lines() - .map(|l| String::from(l.split_once(' ').unwrap().0)) - .collect(); + let output1 = new_ucmd!() + .arg("--output=source") + .succeeds() + .stdout_move_str(); + let output2 = new_ucmd!() + .arg("--output=source") + .succeeds() + .stdout_move_str(); assert_eq!(output1, output2); }