()
| 1978 | #[cfg(unix)] |
| 1979 | #[test] |
| 1980 | fn symlink_hook_is_never_replaced() { |
| 1981 | use std::os::unix::fs::symlink; |
| 1982 | |
| 1983 | let root = TempDir::new().unwrap(); |
| 1984 | let target = root.path().join("target"); |
| 1985 | let hook = root.path().join("post-checkout"); |
| 1986 | fs::write(&target, b"custom target\n").unwrap(); |
| 1987 | symlink(&target, &hook).unwrap(); |
| 1988 | |
| 1989 | let result = install_or_refresh_dispatcher(&hook, "owned").unwrap(); |
| 1990 | assert_eq!(result, DispatcherInstall::Unmanaged); |
| 1991 | assert_eq!(fs::read(&target).unwrap(), b"custom target\n"); |
| 1992 | assert!(fs::symlink_metadata(&hook) |
| 1993 | .unwrap() |
| 1994 | .file_type() |
| 1995 | .is_symlink()); |
| 1996 | } |
| 1997 | |
| 1998 | /// CB-8B ac-4: a deferred observation request is consumed exactly once. |
| 1999 | /// A duplicate run (the event duplicated between prepare and consume) is |
nothing calls this directly
no test coverage detected