mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 17:58:06 +00:00
Merge pull request #2782 from sylvestre/test_1665
cp: add a unit test for issue 1665
This commit is contained in:
commit
f2f582aa14
1 changed files with 9 additions and 0 deletions
|
@ -731,6 +731,15 @@ fn test_cp_writable_special_file_permissions() {
|
|||
new_ucmd!().arg("/dev/null").arg("/dev/zero").succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn test_cp_issue_1665() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.arg("/dev/null").arg("foo").succeeds();
|
||||
assert!(at.file_exists("foo"));
|
||||
assert_eq!(at.read("foo"), "");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cp_preserve_no_args() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Reference in a new issue