initial skeleton
This commit is contained in:
parent
dc79fa2448
commit
71f89dde9c
60 changed files with 3480 additions and 0 deletions
21
crates/aim-core/tests/install_paths.rs
Normal file
21
crates/aim-core/tests/install_paths.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use std::path::Path;
|
||||
|
||||
use aim_core::domain::app::InstallScope;
|
||||
use aim_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/aim/appimages/bat.AppImage")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn system_scope_desktop_entry_uses_system_prefix() {
|
||||
let path = desktop_entry_path(Path::new("/home/test"), InstallScope::System, "bat");
|
||||
|
||||
assert_eq!(path, Path::new("/usr/share/applications/aim-bat.desktop"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue