Add tests for tab width.

This commit is contained in:
Tom Alexander
2023-09-29 15:47:58 -04:00
parent 9a479b33e0
commit 0c363c8dd6
4 changed files with 38 additions and 0 deletions

View File

@@ -7,10 +7,12 @@ use crate::GlobalSettings;
///
/// Currently only org-list-allow-alphabetical is supported.
fn global_settings_elisp(global_settings: &GlobalSettings) -> String {
// This string concatenation is wildly inefficient but its only called in tests 🤷.
let mut ret = "".to_owned();
if global_settings.list_allow_alphabetical {
ret += "(setq org-list-allow-alphabetical t)\n"
}
ret += format!("(setq-default tab-width {})", global_settings.tab_width).as_str();
ret
}