initial skeleton

This commit is contained in:
stoorps 2026-03-19 18:46:50 +00:00
parent dc79fa2448
commit 71f89dde9c
Signed by: stoorps
SSH key fingerprint: SHA256:AZlPfu9hTu042EGtZElmDQoy+KvMOeShLDan/fYLoNI
60 changed files with 3480 additions and 0 deletions

View file

@ -0,0 +1,31 @@
use aim_core::app::identity::{IdentityFallback, resolve_identity};
use aim_core::domain::app::IdentityConfidence;
#[test]
fn unresolved_identity_can_fall_back_to_url() {
let identity = resolve_identity(
None,
None,
Some("https://example.com/app.AppImage"),
IdentityFallback::AllowRawUrl,
)
.unwrap();
assert!(identity.stable_id.contains("example.com"));
assert_eq!(identity.confidence, IdentityConfidence::RawUrlFallback);
}
#[test]
fn explicit_id_is_treated_as_confident() {
let identity = resolve_identity(
Some("Bat"),
Some("sharkdp/bat"),
Some("https://github.com/sharkdp/bat/releases"),
IdentityFallback::AllowRawUrl,
)
.unwrap();
assert_eq!(identity.stable_id, "sharkdp-bat");
assert_eq!(identity.display_name, "Bat");
assert_eq!(identity.confidence, IdentityConfidence::Confident);
}