mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tests/util: Refactor UCommand and TestScenario.
Summary of changes in UCommand: * Extend UCommand by builder methods and simplify methods in TestScenario * Simplify code structures where possible. Add documentation. * Store bin_path as PathBuf and util_name as String in all structs * Remove UCommand::util and make bin_path, temp_dir private * Rename UCommand::with_limit -> UCommand::limit Summary of changes in TestScenario: * Rename some parameters in TestScenario methods to be more descriptive * Remove ucmd_keepenv, cmd_keepenv from TestScenario. Use UCommand::keep_env instead.
This commit is contained in:
parent
fdf0f96a01
commit
1c230fd779
12 changed files with 276 additions and 185 deletions
|
@ -48,7 +48,7 @@ fn run_single_test(test: &TestCase, at: &AtPath, mut ucmd: UCommand) {
|
|||
let r = ucmd.run();
|
||||
if !r.succeeded() {
|
||||
println!("{}", r.stderr_str());
|
||||
panic!("{}: failed", ucmd);
|
||||
panic!("{ucmd}: failed");
|
||||
}
|
||||
|
||||
let perms = at.metadata(TEST_FILE).permissions().mode();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue