mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-06-22 10:02:20 +00:00
test(macos): avoid hardcoded install script app names
- derive optional prefs assertions from crate::get_app_name()\n- keep install script regression coverage compatible with rebranded builds Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
This commit is contained in:
parent
f5ed8f782a
commit
54dd29d1a6
1 changed files with 8 additions and 3 deletions
|
|
@ -319,6 +319,7 @@ mod tests {
|
|||
.and_then(|file| file.contents_utf8())
|
||||
.map(correct_app_name)
|
||||
.expect("install.scpt should be embedded");
|
||||
let app_name = crate::get_app_name();
|
||||
|
||||
assert!(
|
||||
install.contains("launchctl bootstrap gui/$uid")
|
||||
|
|
@ -335,9 +336,13 @@ mod tests {
|
|||
"install script must quote username-derived paths",
|
||||
);
|
||||
assert!(
|
||||
install.contains("test ! -f \"$user_preferences_dir/RustDesk.toml\" || cp -rf")
|
||||
&& install
|
||||
.contains("test ! -f \"$user_preferences_dir/RustDesk2.toml\" || cp -rf"),
|
||||
install.contains(&format!(
|
||||
"test ! -f \"$user_preferences_dir/{}.toml\" || cp -rf",
|
||||
app_name
|
||||
)) && install.contains(&format!(
|
||||
"test ! -f \"$user_preferences_dir/{}2.toml\" || cp -rf",
|
||||
app_name
|
||||
)),
|
||||
"install script must treat missing preference files as optional",
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue