mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-26 22:15:19 +03:00
Add custom function for unit test in zellij-utils
This commit is contained in:
parent
82288c6a3d
commit
e2949509a2
@ -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![
|
||||
|
Loading…
Reference in New Issue
Block a user