use super::*; #[derive(Debug)] pub(crate) enum Expected { String(String), Regex(Regex), } impl Expected { pub(crate) fn regex(pattern: &str) -> Self { Self::Regex(Regex::new(&format!("^(?s){pattern}$")).unwrap()) } pub(crate) fn assert_match(&self, output: &str) { match self { Self::String(string) => pretty_assert_eq!(output, string), Self::Regex(regex) => assert!( regex.is_match(output), "regex:\n{regex}\ndid not match output:\n{output}", ), } } }
Inscription number 44,996,200
Genesis block 819,097
File type text
File size 514 b
Creation date Nov 30,2023 9:8 am