test: hide local tests behind ff

This commit is contained in:
Paul Delafosse 2025-01-23 11:09:45 +01:00
parent 8470bb3183
commit 2147fc7b98
No known key found for this signature in database
GPG key ID: BE7DF2A0DC126E7C
4 changed files with 13 additions and 11 deletions

View file

@ -14,7 +14,7 @@ mod paths;
type Result<T> = std::result::Result<T, ThemeError>;
pub static THEMES: Lazy<BTreeMap<String, Vec<Theme>>> = Lazy::new(|| get_all_themes());
pub static THEMES: Lazy<BTreeMap<String, Vec<Theme>>> = Lazy::new(get_all_themes);
pub struct Theme {
pub path: ThemePath,

View file

@ -55,7 +55,7 @@ mod test {
#[test]
fn should_get_all_themes() {
let themes = get_all_themes().unwrap();
let themes = get_all_themes();
assert_that!(themes.get("hicolor")).is_some();
}
@ -67,7 +67,7 @@ mod test {
#[test]
fn should_read_theme_index() -> Result<()> {
let themes = get_all_themes()?;
let themes = get_all_themes();
let themes: Vec<&Theme> = themes.values().flatten().collect();
assert_that!(themes).is_not_empty();
Ok(())