From 75700677ca440203be5a6cb348b508ff5b592369 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 27 Mar 2021 10:08:03 +0100 Subject: [PATCH] fix(install): improve the error output when the test is failing --- tests/by-util/test_install.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/by-util/test_install.rs b/tests/by-util/test_install.rs index dfd5c1c8d..3a8771f5d 100644 --- a/tests/by-util/test_install.rs +++ b/tests/by-util/test_install.rs @@ -352,11 +352,19 @@ fn test_install_copy_file() { #[test] #[cfg(target_os = "linux")] fn test_install_target_file_dev_null() { - let (at, mut ucmd) = at_and_ucmd!(); + let scene = TestScenario::new(util_name!()); + let at = &scene.fixtures; + let file1 = "/dev/null"; let file2 = "target_file"; - ucmd.arg(file1).arg(file2).succeeds().no_stderr(); + let result = scene.ucmd().arg(file1).arg(file2).run(); + + println!("stderr = {:?}", result.stderr); + println!("stdout = {:?}", result.stdout); + + assert!(result.success); + assert!(at.file_exists(file2)); }