diff --git a/tests/by-util/test_install.rs b/tests/by-util/test_install.rs index d8eace9d04..a11613a38e 100644 --- a/tests/by-util/test_install.rs +++ b/tests/by-util/test_install.rs @@ -541,6 +541,22 @@ fn test_install_target_file_dev_null() { assert!(at.file_exists(file2)); } +#[test] +#[cfg(unix)] +fn test_install_replaces_special_target() { + let (at, mut ucmd) = at_and_ucmd!(); + let source = "source_file"; + let target = "target_fifo"; + + at.write(source, "contents"); + at.mkfifo(target); + + ucmd.arg(source).arg(target).succeeds().no_stderr(); + + assert!(at.file_exists(target)); + assert_eq!(at.read(target), "contents"); +} + #[test] fn test_install_nested_paths_copy_file() { let (at, mut ucmd) = at_and_ucmd!();