mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
test(cp): cp /dev/null target is supposed to work. Add a test
This commit is contained in:
parent
e06ee40fd1
commit
a2d6c85e44
1 changed files with 19 additions and 0 deletions
|
@ -903,3 +903,22 @@ fn test_cp_dont_preserve_timestamps() {
|
||||||
assert!(res.as_secs() < 3605);
|
assert!(res.as_secs() < 3605);
|
||||||
assert!(result.success);
|
assert!(result.success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
fn test_cp_target_file_dev_null() {
|
||||||
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
|
let file1 = "/dev/null";
|
||||||
|
let file2 = "test_cp_target_file_file_i2";
|
||||||
|
|
||||||
|
at.touch(file1);
|
||||||
|
at.touch(file2);
|
||||||
|
ucmd.arg(file1).arg(file2).fails();
|
||||||
|
|
||||||
|
/* Uncomment when fixed
|
||||||
|
ucmd.arg(file1).arg(file2).succeeds().no_stderr();
|
||||||
|
|
||||||
|
assert!(at.file_exists(file1));
|
||||||
|
assert!(at.file_exists(file2));
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue