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

Fix some tests to not use CmdResult fields

This commit is contained in:
Gilad Naaman 2021-04-05 23:03:43 +03:00
parent 4695667c7c
commit 81d42aa2b3
22 changed files with 353 additions and 478 deletions

View file

@ -520,10 +520,7 @@ fn test_symlink_no_deref_dir() {
scene.ucmd().args(&["-sn", dir1, link]).fails();
// Try with the no-deref
let result = scene.ucmd().args(&["-sfn", dir1, link]).run();
println!("stdout {}", result.stdout);
println!("stderr {}", result.stderr);
assert!(result.success);
scene.ucmd().args(&["-sfn", dir1, link]).succeeds();
assert!(at.dir_exists(dir1));
assert!(at.dir_exists(dir2));
assert!(at.is_symlink(link));
@ -566,10 +563,7 @@ fn test_symlink_no_deref_file() {
scene.ucmd().args(&["-sn", file1, link]).fails();
// Try with the no-deref
let result = scene.ucmd().args(&["-sfn", file1, link]).run();
println!("stdout {}", result.stdout);
println!("stderr {}", result.stderr);
assert!(result.success);
scene.ucmd().args(&["-sfn", file1, link]).succeeds();
assert!(at.file_exists(file1));
assert!(at.file_exists(file2));
assert!(at.is_symlink(link));