()
| 2009 | #[cfg(unix)] |
| 2010 | #[test] |
| 2011 | fn symlink_hook_is_never_replaced() { |
| 2012 | use std::os::unix::fs::symlink; |
| 2013 | |
| 2014 | let root = TempDir::new().unwrap(); |
| 2015 | let target = root.path().join("target"); |
| 2016 | let hook = root.path().join("post-checkout"); |
| 2017 | fs::write(&target, b"custom target\n").unwrap(); |
| 2018 | symlink(&target, &hook).unwrap(); |
| 2019 | |
| 2020 | let result = install_or_refresh_dispatcher(&hook, "owned").unwrap(); |
| 2021 | assert_eq!(result, DispatcherInstall::Unmanaged); |
| 2022 | assert_eq!(fs::read(&target).unwrap(), b"custom target\n"); |
| 2023 | assert!(fs::symlink_metadata(&hook) |
| 2024 | .unwrap() |
| 2025 | .file_type() |
| 2026 | .is_symlink()); |
| 2027 | } |
| 2028 | |
| 2029 | /// CB-8B ac-4: a deferred observation request is consumed exactly once. |
| 2030 | /// A duplicate run (the event duplicated between prepare and consume) is |
nothing calls this directly
no test coverage detected