aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/input/unit/theme_test.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-10-05 07:44:00 +0200
committerGitHub <noreply@github.com>2022-10-05 07:44:00 +0200
commit79bf6ab868cbdab1f9a3827c9b70198f54548b44 (patch)
tree2d6fc4c1d8a79ebd727a1a5f8b6406617dd0de55 /zellij-utils/src/input/unit/theme_test.rs
parentdocs(changelog): add darwin dependencies (diff)
downloadsl0ppij-79bf6ab868cbdab1f9a3827c9b70198f54548b44.tar.gz
sl0ppij-79bf6ab868cbdab1f9a3827c9b70198f54548b44.tar.xz
sl0ppij-79bf6ab868cbdab1f9a3827c9b70198f54548b44.zip
feat(config): switch to kdl (#1759)
* chore(config): default kdl keybindings config * tests * work * refactor(config): move stuff around * work * tab merge layout * work * work * layouts working * work * layout tests * work * work * feat(parsing): kdl layouts without config * refactor(kdl): move stuff around * work * tests(layout): add cases and fix bugs * work * fix(kdl): various bugs * chore(layouts): move all layouts to kdl * feat(kdl): shared keybidns * fix(layout): do not count fixed panes toward percentile * fix(keybinds): missing keybinds and actions * fix(config): adjust default tips * refactor(config): move stuff around * fix(tests): make e2e tests pass * fix(kdl): add verbose parsing errors * fix(kdl): focused tab * fix(layout): corret default_tab_template behavior * style(code): fix compile warnings * feat(cli): send actions through the cli * fix(cli): exit only when action is done * fix(cli): open embedded pane from floating pane * fix(cli): send actions to other sessions * feat(cli): command alias * feat(converter): convert old config * feat(converter): convert old layout and theme files * feat(kdl): pretty errors * feat(client): convert old YAML files on startup * fix: various bugs and styling issues * fix: e2e tests * fix(screen): propagate errors after merge * style(clippy): lower clippy level * fix(tests): own session_name variable * style(fmt): rustfmt * fix(cli): various action fixes * style(fmt): rustfmt * fix(themes): loading of theme files * style(fmt): rustfmt * fix(tests): theme fixtures * fix(layouts): better errors on unknown nodes * fix(kdl): clarify valid node terminator error * fix(e2e): adjust close tab test * fix(e2e): adjust close tab test again * style(code): cleanup some comments
Diffstat (limited to '')
-rw-r--r--zellij-utils/src/input/unit/theme_test.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/zellij-utils/src/input/unit/theme_test.rs b/zellij-utils/src/input/unit/theme_test.rs
index ad5b480a..56259201 100644
--- a/zellij-utils/src/input/unit/theme_test.rs
+++ b/zellij-utils/src/input/unit/theme_test.rs
@@ -1,5 +1,6 @@
use super::super::theme::*;
-use std::path::PathBuf;
+use insta::assert_snapshot;
+use std::path::{Path, PathBuf};
fn theme_test_dir(theme: String) -> PathBuf {
let root = Path::new(env!("CARGO_MANIFEST_DIR"));
@@ -8,15 +9,15 @@ fn theme_test_dir(theme: String) -> PathBuf {
}
#[test]
-fn dracula_theme_is_ok() {
- let path = theme_test_dir("dracula.yaml".into());
- let theme = ThemesFromYaml::from_path(&path);
- assert!(theme.is_ok());
+fn dracula_theme_from_file() {
+ let path = theme_test_dir("dracula.kdl".into());
+ let theme = Theme::from_path(path).unwrap();
+ assert_snapshot!(format!("{:#?}", theme));
}
#[test]
fn no_theme_is_err() {
- let path = theme_test_dir("nonexistent.yaml".into());
- let theme = ThemesFromYaml::from_path(&path);
+ let path = theme_test_dir("nonexistent.kdl".into());
+ let theme = Theme::from_path(path);
assert!(theme.is_err());
}