aboutsummaryrefslogtreecommitdiff
path: root/src/integration/tests.rs
diff options
context:
space:
mode:
authorJJ Liebig <jonathan.liebig@gmail.com>2026-09-04 01:05:35 +0200
committerGitHub <noreply@github.com>2026-09-04 01:05:35 +0200
commit3150bd92d6162ba248bc28fd4d40bd0d6238e1af (patch)
treebeab751f2fc61d49a9f771091b9132cd1357b070 /src/integration/tests.rs
parent73825652244edaf11d3fddc89b5b00266edcae0d (diff)
fix(integration): resolve Devin config on Windows (#3595)
refs #2724
Diffstat (limited to 'src/integration/tests.rs')
-rw-r--r--src/integration/tests.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/integration/tests.rs b/src/integration/tests.rs
index c2d94a6e..a02a549e 100644
--- a/src/integration/tests.rs
+++ b/src/integration/tests.rs
@@ -134,6 +134,8 @@ fn clear_integration_path_env() {
std::env::remove_var(COPILOT_HOME_ENV_VAR);
std::env::remove_var(KIMI_CODE_HOME_ENV_VAR);
std::env::remove_var("XDG_CONFIG_HOME");
+ #[cfg(windows)]
+ std::env::remove_var("APPDATA");
std::env::remove_var(QODERCLI_CONFIG_DIR_ENV_VAR);
std::env::remove_var(QWEN_HOME_ENV_VAR);
std::env::remove_var(CURSOR_CONFIG_DIR_ENV_VAR);
@@ -211,6 +213,36 @@ fn home_dir_uses_userprofile_when_home_is_missing() {
#[cfg(windows)]
#[test]
+fn windows_devin_dir_uses_appdata_without_xdg_override() {
+ let previous_appdata;
+ {
+ let _lock = integration_env_lock();
+ previous_appdata = std::env::var_os("APPDATA");
+ let previous_xdg = std::env::var_os("XDG_CONFIG_HOME");
+ let base = unique_base();
+ let appdata = base.join("appdata");
+ let xdg = base.join("xdg");
+ std::env::set_var("APPDATA", &appdata);
+
+ assert_eq!(devin_dir().unwrap(), appdata.join("devin"));
+
+ std::env::set_var("XDG_CONFIG_HOME", &xdg);
+ assert_eq!(devin_dir().unwrap(), xdg.join("devin"));
+
+ if let Some(value) = previous_xdg {
+ std::env::set_var("XDG_CONFIG_HOME", value);
+ } else {
+ std::env::remove_var("XDG_CONFIG_HOME");
+ }
+ }
+ {
+ let _lock = integration_env_lock();
+ assert_eq!(std::env::var_os("APPDATA"), previous_appdata);
+ }
+}
+
+#[cfg(windows)]
+#[test]
fn windows_supports_portable_integrations() {
use crate::api::schema::IntegrationTarget;