diff options
Diffstat (limited to 'svgbob/tests/simple_shapes.rs')
-rw-r--r-- | svgbob/tests/simple_shapes.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/svgbob/tests/simple_shapes.rs b/svgbob/tests/simple_shapes.rs index 8452d73..9ecf09d 100644 --- a/svgbob/tests/simple_shapes.rs +++ b/svgbob/tests/simple_shapes.rs @@ -20,3 +20,24 @@ fn rect1() { println!("{}", svg); assert_eq!(expected, svg); } + +#[test] +fn rounded_rect() { + let bob = r#" + .----------. + | | + '----------' + "#; + + let expected = r#"<svg xmlns="http://www.w3.org/2000/svg" width="136" height="80"> + <rect x="36" y="24" width="88" height="32" class="solid nofill" rx="4"></rect> +</svg>"#; + + let mut settings = Settings::default(); + settings.include_backdrop = false; + settings.include_styles = false; + settings.include_defs = false; + let svg = svgbob::to_svg_with_settings(bob, &settings); + println!("{}", svg); + assert_eq!(expected, svg); +} |