use spreadsheet_ods::style::ParagraphStyleRef; use spreadsheet_ods::text::{MetaAuthorName, MetaCreationDate, TextH, TextP, TextS, TextTag}; #[test] fn test_text() { let txt = TextTag::new("text:p") .tag(MetaAuthorName::new()) .tag(TextH::new().style_name(&"style0".into()).text("wablawa")); assert_eq!( txt.to_string(), r#" wablawa "# ); } #[test] fn test_text2() { let p1_ref = ParagraphStyleRef::from("p1"); let txt = TextP::new() .style_name(&p1_ref) .text("some text") .tag(MetaAuthorName::new()) .tag(TextS::new()) .tag(MetaCreationDate::new()) .tag(TextS::new()) .text("whatever"); assert_eq!( txt.to_string(), r#" some text whatever "# ) }