aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2021-07-04 21:16:47 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2021-07-06 21:32:44 +0530
commite2949509a2eecf62cc8476891a89cb8a4cad1623 (patch)
tree6e1cada170683e96165b3862a73814139209e8e5 /zellij-utils
parentRemove test feature and hacks (diff)
downloadsl0ppij-e2949509a2eecf62cc8476891a89cb8a4cad1623.tar.gz
sl0ppij-e2949509a2eecf62cc8476891a89cb8a4cad1623.tar.xz
sl0ppij-e2949509a2eecf62cc8476891a89cb8a4cad1623.zip
Add custom function for unit test in zellij-utils
Diffstat (limited to 'zellij-utils')
-rw-r--r--zellij-utils/src/setup.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/zellij-utils/src/setup.rs b/zellij-utils/src/setup.rs
index c25e1fb9..61c330cd 100644
--- a/zellij-utils/src/setup.rs
+++ b/zellij-utils/src/setup.rs
@@ -12,6 +12,7 @@ const CONFIG_LOCATION: &str = ".config/zellij";
const CONFIG_NAME: &str = "config.yaml";
static ARROW_SEPARATOR: &str = "";
+#[cfg(not(test))]
/// Goes through a predefined list and checks for an already
/// existing config directory, returns the first match
pub fn find_default_config_dir() -> Option<PathBuf> {
@@ -22,6 +23,11 @@ pub fn find_default_config_dir() -> Option<PathBuf> {
.flatten()
}
+#[cfg(test)]
+pub fn find_default_config_dir() -> Option<PathBuf> {
+ None
+}
+
/// Order in which config directories are checked
fn default_config_dirs() -> Vec<Option<PathBuf>> {
vec![