We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 174ea1e commit 6fe4514Copy full SHA for 6fe4514
tests/by-util/test_install.rs
@@ -1764,3 +1764,18 @@ fn test_install_from_stdin() {
1764
assert!(at.file_exists(target));
1765
assert_eq!(at.read(target), test_string);
1766
}
1767
+
1768
+#[test]
1769
+fn test_install_failing_copy_file_to_target_contain_subdir_with_same_name() {
1770
+ let (at, mut ucmd) = at_and_ucmd!();
1771
+ let file = "file";
1772
+ let dir1 = "dir1";
1773
1774
+ at.touch(file);
1775
+ at.mkdir(dir1);
1776
+ at.mkdir(format!("{}/{}", dir1, file));
1777
+ ucmd.arg(file)
1778
+ .arg(dir1)
1779
+ .fails()
1780
+ .stderr_contains("cannot overwrite directory");
1781
+}
0 commit comments