()
| 992 | |
| 993 | #[test] |
| 994 | fn test_install_idempotent() { |
| 995 | let dir = tempfile::tempdir().unwrap(); |
| 996 | let hook = make_hook(); |
| 997 | |
| 998 | let count1 = hook.install(dir.path()).unwrap(); |
| 999 | assert_eq!(count1, 6); |
| 1000 | |
| 1001 | // Second install should find them already present |
| 1002 | let count2 = hook.install(dir.path()).unwrap(); |
| 1003 | assert_eq!(count2, 0); |
| 1004 | } |
| 1005 | |
| 1006 | #[test] |
| 1007 | fn test_is_installed() { |