summaryrefslogtreecommitdiffstats
path: root/src/constants.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/constants.rs')
-rw-r--r--src/constants.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/constants.rs b/src/constants.rs
index d736e928..f09a5d5b 100644
--- a/src/constants.rs
+++ b/src/constants.rs
@@ -752,6 +752,7 @@ mod test {
#[test]
fn help_menu_matches_entry_len() {
+ // The two match since HELP_TEXT contains HELP_CONTENTS_TEXT as an entry
assert_eq!(
HELP_CONTENTS_TEXT.len(),
HELP_TEXT.len(),
@@ -759,6 +760,16 @@ mod test {
)
}
+ #[test]
+ fn help_menu_text_has_sections() {
+ for (itx, line) in HELP_TEXT.iter().enumerate() {
+ if itx > 0 {
+ assert!(line.len() >= 2, "each section should be at least 2 lines");
+ assert!(line[0].contains(" - "), "each section should have a header");
+ }
+ }
+ }
+
/// This test exists because previously, [`SIDE_BORDERS`] was set incorrectly after I moved from
/// tui-rs to ratatui.
#[test]