Add a GetStandardProperties trait.

This commit is contained in:
Tom Alexander
2023-09-23 19:13:01 -04:00
parent d4f27ef297
commit b4c985071c
15 changed files with 132 additions and 431 deletions

View File

@@ -146,7 +146,7 @@ mod tests {
use crate::context::GlobalSettings;
use crate::context::List;
use crate::parser::object_parser::detect_standard_set_object_sans_plain_text;
use crate::types::Source;
use crate::types::GetStandardProperties;
#[test]
fn plain_text_simple() {
@@ -159,6 +159,9 @@ mod tests {
))(&initial_context);
let (remaining, result) = map(plain_text_matcher, Object::PlainText)(input).unwrap();
assert_eq!(Into::<&str>::into(remaining), "");
assert_eq!(result.get_source(), Into::<&str>::into(input));
assert_eq!(
result.get_standard_properties().get_source(),
Into::<&str>::into(input)
);
}
}