Libre Dex Logo
Search mobile
menu
Inscription #44,996,200
text/plain;charset=utf-8view raw data
"use super::*;\n\n#[derive(Debug)]\npub(crate) enum Expected {\n  String(String),\n  Regex(Regex),\n}\n\nimpl Expected {\n  pub(crate) fn regex(pattern: &str) -> Self {\n    Self::Regex(Regex::new(&format!(\"^(?s){pattern}$\")).unwrap())\n  }\n\n  pub(crate) fn assert_match(&self, output: &str) {\n    match self {\n      Self::String(string) => pretty_assert_eq!(output, string),\n      Self::Regex(regex) => assert!(\n        regex.is_match(output),\n        \"regex:\\n{regex}\\ndid not match output:\\n{output}\",\n      ),\n    }\n  }\n}\n"
Share this inscription:
https://libre.org/inscriptions/656f-32i0
copy inscription
ID
656f-32i0 copy inscription
Owned By
bc1p8-t8wwx
Inscribed by
bc1p8-t8wwx
Inscription Date
Nov 30, 2023, 09:08 AM
Sat
1568863774363255
Rarity
common