refactor: rename aim to upm and extract appimage module
This commit is contained in:
parent
af13e98eb3
commit
863c57e473
117 changed files with 2622 additions and 887 deletions
28
crates/upm-core/tests/install_paths.rs
Normal file
28
crates/upm-core/tests/install_paths.rs
Normal 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"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue