()
| 160 | |
| 161 | #[test] |
| 162 | fn loads_full_manifest() { |
| 163 | let tmp = tempfile::tempdir().unwrap(); |
| 164 | write_manifest( |
| 165 | tmp.path(), |
| 166 | r#" |
| 167 | schema = 1 |
| 168 | agent = "opencode" |
| 169 | version = "1.2.0" |
| 170 | |
| 171 | [requires] |
| 172 | atomic = ">=0.11.0" |
| 173 | |
| 174 | [[file]] |
| 175 | src = "plugins/atomic-hooks.ts" |
| 176 | dst = "~/.config/opencode/plugins/atomic-hooks.ts" |
| 177 | |
| 178 | [[file]] |
| 179 | src = "agents/atomic.md" |
| 180 | dst = "~/.config/opencode/agents/atomic.md" |
| 181 | |
| 182 | [[settings]] |
| 183 | manifest = "hooks/opencode.atomic-hooks.json" |
| 184 | "#, |
| 185 | ); |
| 186 | let m = IntegrationManifest::load(tmp.path()).unwrap(); |
| 187 | assert_eq!(m.files.len(), 2); |
| 188 | assert_eq!(m.files[0].src, "plugins/atomic-hooks.ts"); |
| 189 | assert_eq!(m.settings.len(), 1); |
| 190 | let paths = m.settings_manifest_paths(tmp.path()); |
| 191 | assert_eq!( |
| 192 | paths, |
| 193 | vec![tmp.path().join("hooks/opencode.atomic-hooks.json")] |
| 194 | ); |
| 195 | } |
| 196 | |
| 197 | #[test] |
| 198 | fn rejects_newer_schema() { |
nothing calls this directly
no test coverage detected