refactor: rename aim to upm and extract appimage module

This commit is contained in:
stoorps 2026-03-21 22:39:11 +00:00
parent af13e98eb3
commit 863c57e473
Signed by: stoorps
SSH key fingerprint: SHA256:AZlPfu9hTu042EGtZElmDQoy+KvMOeShLDan/fYLoNI
117 changed files with 2622 additions and 887 deletions

View file

@ -0,0 +1,28 @@
use std::path::Path;
use upm_core::domain::app::InstallScope;
use upm_core::integration::paths::{desktop_entry_path, managed_appimage_path};
#[test]
fn user_scope_path_lands_under_home_managed_dir() {
let path = managed_appimage_path(Path::new("/home/test"), InstallScope::User, "bat");
assert_eq!(
path,
Path::new("/home/test/.local/lib/upm/appimages/bat.AppImage")
);
}
#[test]
fn system_scope_path_lands_under_opt_upm_dir() {
let path = managed_appimage_path(Path::new("/home/test"), InstallScope::System, "bat");
assert_eq!(path, Path::new("/opt/upm/appimages/bat.AppImage"));
}
#[test]
fn system_scope_desktop_entry_uses_upm_prefix() {
let path = desktop_entry_path(Path::new("/home/test"), InstallScope::System, "bat");
assert_eq!(path, Path::new("/usr/share/applications/upm-bat.desktop"));
}