From 25d4fb71ca36233965b0401098abd5551e7f783f Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sun, 22 Dec 2019 16:51:22 -0600 Subject: [PATCH] tests/refactor ~ change to use of common code (`TestScenario::...`) for testing --- tests/test_stat.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_stat.rs b/tests/test_stat.rs index cac756548..d7187f1ca 100644 --- a/tests/test_stat.rs +++ b/tests/test_stat.rs @@ -233,8 +233,5 @@ fn test_printf() { #[cfg(target_os = "linux")] fn expected_result(args: &[&str]) -> String { - use std::process::Command; - - let output = Command::new(util_name!()).env("LANGUAGE", "C").args(args).output().unwrap(); - String::from_utf8_lossy(&output.stdout).into_owned() + TestScenario::new(util_name!()).cmd_keepenv(util_name!()).env("LANGUAGE", "C").args(args).run().stdout }