()
| 642 | |
| 643 | #[test] |
| 644 | fn test_install_idempotent() { |
| 645 | let dir = tempfile::tempdir().unwrap(); |
| 646 | let hook = make_hook(); |
| 647 | |
| 648 | let count1 = hook.install(dir.path()).unwrap(); |
| 649 | assert_eq!(count1, 8); |
| 650 | |
| 651 | // Second install should return 0 (nothing new to install) |
| 652 | let count2 = hook.install(dir.path()).unwrap(); |
| 653 | assert_eq!(count2, 0); |
| 654 | } |
| 655 | |
| 656 | #[test] |
| 657 | fn test_install_preserves_existing_hooks() { |