use indent_string::{indent_string, indent_string_with};
#[test]
fn block_quote() {
let text = "line one\nline two";
assert_eq!(indent_string_with(text, 1, "> ", false), "> line one\n> line two");
}
#[test]
fn nested_indent() {
let code = "if x {\n y();\n}";
assert_eq!(indent_string_with(code, 1, " ", false), " if x {\n y();\n }");
}
#[test]
fn empty_line_handling() {
assert_eq!(indent_string("a\n\nb"), " a\n\n b");
assert_eq!(indent_string_with("a\n\nb", 1, ".", true), ".a\n.\n.b");
}
#[test]
fn count_zero_is_identity() {
assert_eq!(indent_string_with("anything\nhere", 0, " ", true), "anything\nhere");
}