()
| 1026 | |
| 1027 | #[test] |
| 1028 | fn test_install_idempotent() { |
| 1029 | let dir = tempfile::tempdir().unwrap(); |
| 1030 | let hook = make_hook(); |
| 1031 | |
| 1032 | let count1 = hook.install(dir.path()).unwrap(); |
| 1033 | assert_eq!(count1, 6); |
| 1034 | |
| 1035 | // Second install should find them already present |
| 1036 | let count2 = hook.install(dir.path()).unwrap(); |
| 1037 | assert_eq!(count2, 0); |
| 1038 | } |
| 1039 | |
| 1040 | #[test] |
| 1041 | fn test_is_installed() { |