aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-08-07 20:59:32 +0300
committerGitHub <noreply@github.com>2026-08-07 20:59:32 +0300
commitbdb5222eec9109f4a337ab79d12c3f3ee3cd7a4b (patch)
tree1081a0036513199d17b35f8de9e43c9841c7be36 /tests
parent00f04ac65cedf882f9785c0aa20831523c554dd0 (diff)
fix(config): report unknown theme names (#2488)
refs #2452
Diffstat (limited to 'tests')
-rw-r--r--tests/cli/workspace.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/cli/workspace.rs b/tests/cli/workspace.rs
index 8c435b2d..4153f3b2 100644
--- a/tests/cli/workspace.rs
+++ b/tests/cli/workspace.rs
@@ -497,6 +497,33 @@ new_tabb = "ctrl+t"
}
#[test]
+fn config_check_reports_unknown_theme_names() {
+ let base = unique_test_dir();
+ let config_home = base.join("config");
+ let runtime_dir = base.join("runtime");
+ let config_dir = config_home.join(app_dir_name());
+ fs::create_dir_all(&config_dir).unwrap();
+ fs::write(
+ config_dir.join("config.toml"),
+ "[theme]\nname = \"catppucin\"\n",
+ )
+ .unwrap();
+
+ let checked = run_named_cli(&config_home, &runtime_dir, &["config", "check"]);
+
+ assert_eq!(checked.status.code(), Some(1));
+ let stdout = String::from_utf8_lossy(&checked.stdout);
+ assert!(stdout.contains("config: issues found"), "{stdout}");
+ assert!(
+ stdout.contains("unknown theme name theme.name = \"catppucin\"; using \"catppuccin\""),
+ "{stdout}"
+ );
+ assert!(stdout.contains("valid themes: catppuccin"), "{stdout}");
+
+ cleanup_test_base(&base);
+}
+
+#[test]
fn config_check_reports_unreadable_config_path() {
let base = unique_test_dir();
let config_home = base.join("config");