mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Merge pull request #4293 from Joining7943/tests-util-refactor-ucommand-add-run-in-shell
`tests/util`: Small Refactor/Fixes of `UCommand` and add method to run a `UCommand` in a shell platform independently
This commit is contained in:
commit
6bd42fde6a
16 changed files with 406 additions and 248 deletions
|
@ -48,15 +48,12 @@ 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.raw);
|
||||
panic!("{ucmd}: failed");
|
||||
}
|
||||
|
||||
let perms = at.metadata(TEST_FILE).permissions().mode();
|
||||
if perms != test.after {
|
||||
panic!(
|
||||
"{:?}: expected: {:o} got: {:o}",
|
||||
ucmd.raw, test.after, perms
|
||||
);
|
||||
panic!("{}: expected: {:o} got: {:o}", ucmd, test.after, perms);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue