1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

fixed panic! formatting

This commit is contained in:
Mikadore 2021-03-31 13:30:06 +02:00
parent 96643d6f91
commit b8079098f2
5 changed files with 22 additions and 23 deletions

View file

@ -37,10 +37,10 @@ fn run_single_test(test: &TestCase, at: AtPath, mut ucmd: UCommand) {
mkfile(&at.plus_as_string(TEST_FILE), test.before);
let perms = at.metadata(TEST_FILE).permissions().mode();
if perms != test.before {
panic!(format!(
panic!(
"{}: expected: {:o} got: {:o}",
"setting permissions on test files before actual test run failed", test.after, perms
));
);
}
for arg in &test.args {
@ -49,15 +49,15 @@ fn run_single_test(test: &TestCase, at: AtPath, mut ucmd: UCommand) {
let r = ucmd.run();
if !r.success {
println!("{}", r.stderr);
panic!(format!("{:?}: failed", ucmd.raw));
panic!("{:?}: failed", ucmd.raw);
}
let perms = at.metadata(TEST_FILE).permissions().mode();
if perms != test.after {
panic!(format!(
panic!(
"{:?}: expected: {:o} got: {:o}",
ucmd.raw, test.after, perms
));
);
}
}