use veil::redactor::{Redactor, RedactorBuilder};
fn main() {
let redactor: Redactor = RedactorBuilder::new().char('X').partial().build().unwrap();
assert_eq!(redactor.redact("Hello, world!".to_string()), "HelXX, XXrld!");
let mut hello = "Hello, world!".to_string();
let mut goodbye = "Goodbye, world!".to_string();
redactor.redact_in_place(&mut hello).redact_in_place(&mut goodbye);
assert_eq!(hello, "HelXX, XXrld!");
assert_eq!(goodbye, "GooXXXX, XXrld!");
let hello = "Hello, world!".to_string();
let hello_wrapped = redactor.wrap(&hello);
assert_ne!(hello_wrapped.to_string(), hello);
assert_ne!(format!("{:?}", hello_wrapped), format!("{:?}", hello));
assert_eq!(hello_wrapped.to_string(), "HelXX, XXrld!");
assert_eq!(format!("{:?}", hello_wrapped), "\"HelXX, XXrld!\"");
}