Add custom function for unit test in zellij-utils
This commit is contained in:
parent
82288c6a3d
commit
e2949509a2
1 changed files with 6 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ const CONFIG_LOCATION: &str = ".config/zellij";
|
||||||
const CONFIG_NAME: &str = "config.yaml";
|
const CONFIG_NAME: &str = "config.yaml";
|
||||||
static ARROW_SEPARATOR: &str = "";
|
static ARROW_SEPARATOR: &str = "";
|
||||||
|
|
||||||
|
#[cfg(not(test))]
|
||||||
/// Goes through a predefined list and checks for an already
|
/// Goes through a predefined list and checks for an already
|
||||||
/// existing config directory, returns the first match
|
/// existing config directory, returns the first match
|
||||||
pub fn find_default_config_dir() -> Option<PathBuf> {
|
pub fn find_default_config_dir() -> Option<PathBuf> {
|
||||||
|
|
@ -22,6 +23,11 @@ pub fn find_default_config_dir() -> Option<PathBuf> {
|
||||||
.flatten()
|
.flatten()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
pub fn find_default_config_dir() -> Option<PathBuf> {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
|
||||||
/// Order in which config directories are checked
|
/// Order in which config directories are checked
|
||||||
fn default_config_dirs() -> Vec<Option<PathBuf>> {
|
fn default_config_dirs() -> Vec<Option<PathBuf>> {
|
||||||
vec![
|
vec![
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue