extern crate escapade; #[allow(unused_must_use)] mod test { use escapade::Escapable; use escapade::Append; #[test] fn concatenate_safe_and_unsafe() { let mut s = String::from("").escape(); s.append_str(String::from("&world")); assert_eq!("<hello>&world</hello>", s.into_inner()); } #[test] fn concatenate_safe_and_unsafe_str() { let mut s = String::from("").escape(); s.append_str("&world"); assert_eq!("<hello>&world</hello>", s.into_inner()); } #[test] fn concatenate_safe_and_safe() { let mut s = String::from("").safe(); s.append_str(String::from("&world").safe()); assert_eq!("&world", s.into_inner()); } }