aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/atuin-common/src')
-rw-r--r--crates/atuin-common/src/utils.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/atuin-common/src/utils.rs b/crates/atuin-common/src/utils.rs
index 9a84c31b..f4756263 100644
--- a/crates/atuin-common/src/utils.rs
+++ b/crates/atuin-common/src/utils.rs
@@ -200,7 +200,6 @@ mod tests {
use pretty_assertions::assert_ne;
use super::*;
- use std::env;
use std::collections::HashSet;
@@ -214,6 +213,7 @@ mod tests {
test_data_dir();
}
+ #[cfg(not(windows))]
fn test_config_dir_xdg() {
// TODO: Audit that the environment access only happens in single-threaded code.
unsafe { env::remove_var("HOME") };
@@ -227,6 +227,7 @@ mod tests {
unsafe { env::remove_var("XDG_CONFIG_HOME") };
}
+ #[cfg(not(windows))]
fn test_config_dir() {
// TODO: Audit that the environment access only happens in single-threaded code.
unsafe { env::set_var("HOME", "/home/user") };
@@ -239,6 +240,7 @@ mod tests {
unsafe { env::remove_var("HOME") };
}
+ #[cfg(not(windows))]
fn test_data_dir_xdg() {
// TODO: Audit that the environment access only happens in single-threaded code.
unsafe { env::remove_var("HOME") };
@@ -249,6 +251,7 @@ mod tests {
unsafe { env::remove_var("XDG_DATA_HOME") };
}
+ #[cfg(not(windows))]
fn test_data_dir() {
// TODO: Audit that the environment access only happens in single-threaded code.
unsafe { env::set_var("HOME", "/home/user") };