Release v2.0.0
CI / Windows baseline (push) Canceled after 0s

This commit is contained in:
2026-09-11 18:03:03 +03:00
parent f812e32270
commit c5532f2087
2 changed files with 56 additions and 1 deletions
@@ -712,6 +712,42 @@ fn winsw_xml() -> &'static str {
</service>"#
}
#[test]
fn current_singbox_recognizes_the_native_installer_xml() {
let xml = proxywarden_lib::singbox_service::singbox_service_xml();
for xml in [
xml.to_owned(),
xml.replace("&quot;", "&#34;"),
xml.replace("&quot;", "&#x22;"),
] {
let inventory = inventory_singbox_with_host(&current_singbox_host_with_xml(&xml));
assert_eq!(
inventory.classification(),
ComponentClassification::ManagedCurrent
);
}
for entity in ["&unknown;", "&amp;quot;", "&#0;", "&#x110000;"] {
let xml = xml.replace("&quot;", entity);
let inventory = inventory_singbox_with_host(&current_singbox_host_with_xml(&xml));
assert_ne!(
inventory.classification(),
ComponentClassification::ManagedCurrent
);
}
}
#[cfg(windows)]
#[test]
#[ignore = "read-only smoke test requiring an installed managed sing-box"]
fn installed_singbox_inventory_is_current() {
let inventory = proxywarden_lib::component_detection::inventory_singbox();
assert_eq!(
inventory.classification(),
ComponentClassification::ManagedCurrent,
"{inventory:?}"
);
}
fn current_singbox_host_with_xml(xml: &str) -> MockHost {
MockHost::new()
.with_path(r"C:\Program Files\ProxyWarden\components\sing-box\sing-box.exe")