use super::*; use crate::rules::shell_lines::LineSet; /// RULE (Story's new scene list, 18 Nov 2026): a scene's dot says its time of /// day from one mapping in the kit; a time the mapping does not know has none. #[test] fn a_time_of_day_is_read_from_the_kit() { let band = |time: &str| band_of(time).map(|band| band.band.as_str()); assert_eq!(band("NIGHT"), Some("night")); assert_eq!(band("late night"), Some("night")); assert_eq!(band("LATER THAT NIGHT"), Some("night")); assert_eq!(band("Dawn"), Some("dawn")); assert_eq!(band("DAY"), Some("day")); assert_eq!(band("EVENING"), Some("dusk")); assert_eq!(band("CONTINUOUS"), None); assert_eq!(band(""), None); } /// RULE: every question the kit asks has its words in the story line set. #[test] fn every_question_has_its_words() { let lines = LineSet::shipped("story").expect("the story set"); for key in &writing().questions { assert!(lines.say(&format!("question.{key}"), &[]).is_some(), "question.{key} has no words"); } } /// RULE: a character without a kept tint always wears the one their name /// gives, whatever case it is written in; a new character takes an unworn one. #[test] fn a_tint_is_kept_or_given_by_the_name() { assert_eq!(tint_of("", "Ravi"), tint_of("", "RAVI")); assert_eq!(tint_of("moss", "Ravi").key, "moss"); let worn = vec!["rose".to_string()]; assert_eq!(next_tint(&worn, "Maya").key, "slate"); }