use std::path::PathBuf;
use directories::ProjectDirs;
#[must_use]
pub fn default_profile_path() -> Option<PathBuf> {
ProjectDirs::from("", "", "rtcom").map(|dirs| dirs.config_dir().join("default.toml"))
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn default_profile_path_has_rtcom_and_default_toml() {
if let Some(p) = default_profile_path() {
assert!(p.ends_with("default.toml"), "tail: {}", p.display());
let as_str = p.to_string_lossy();
assert!(
as_str.contains("rtcom"),
"path must include rtcom: {as_str}"
);
}
}
}