summaryrefslogtreecommitdiff
path: root/rust/tests
diff options
context:
space:
mode:
author0cyn <kat@vector35.com>2025-11-03 15:04:53 -0500
committer0cyn <kat@vector35.com>2025-11-03 15:04:53 -0500
commit023ec070cf1328879ff95e520a6b14ee092dde60 (patch)
tree0c59006a0fd19fbe24ead3c51ed402dd7114d807 /rust/tests
parent0c55bf12f6148a8f3c4b1af66c950d73e371b351 (diff)
Revert "Refactor Plugin Load/Management to support upcoming changes"
This reverts commit 72fcf44f3731ade3cf1310da55f633f1cb9069ce.
Diffstat (limited to 'rust/tests')
-rw-r--r--rust/tests/repository.rs20
1 files changed, 13 insertions, 7 deletions
diff --git a/rust/tests/repository.rs b/rust/tests/repository.rs
index 82e0e45d..ac861b2c 100644
--- a/rust/tests/repository.rs
+++ b/rust/tests/repository.rs
@@ -4,16 +4,22 @@ use binaryninja::repository::RepositoryManager;
#[test]
fn test_list() {
let _session = Session::new().expect("Failed to initialize session");
- let repositories = RepositoryManager::repositories();
+ let manager = RepositoryManager::default();
+ let repositories = manager.repositories();
for repository in &repositories {
let repo_path = repository.path();
- let repository_by_path = RepositoryManager::repository_by_path(&repo_path).unwrap();
+ let repository_by_path = manager.repository_by_path(&repo_path).unwrap();
assert_eq!(repository.url(), repository_by_path.url());
+ }
- for plugin in &repository.plugins() {
- let plugin_path = plugin.path();
- let plugin_by_path = repository.plugin_by_path(&plugin_path).unwrap();
- assert_eq!(plugin.package_url(), plugin_by_path.package_url());
- }
+ let repository = manager.default_repository();
+ let _full_path = repository.full_path();
+ let _path = repository.path();
+ let _url = repository.url();
+ let plugins = repository.plugins();
+ for plugin in &plugins {
+ let plugin_path = plugin.path();
+ let plugin_by_path = repository.plugin_by_path(&plugin_path).unwrap();
+ assert_eq!(plugin.package_url(), plugin_by_path.package_url());
}
}