mdli
use mdli::md_parse;
fn run_test(name: &str, input: &str) {
println!("# {}", name,);
let result = md_parse(input);
let joined = result.join();
assert_eq!(input, joined, "\n期望: {}\n实际: {}", input, joined);
}
#[test]
fn test_md_parse() {
let test_cases = vec3\n4[link](link_url)"
),
("空",""),
("空行","\n\n"),
("有缩进的行"," 1 \n 2 \n\n 3 "),
];
for (name, input) in test_cases {
run_test(name, input);
}
}
About
This project is an open-source component of i18n.site ⋅ Internationalization Solution.
关于
本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。