[librsvg: 15/28] path_parser: Test that closepath has no arguments



commit ff34532b65c4aa029d7c4302ab6de87f66abbb06
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Jan 23 10:29:28 2018 -0600

    path_parser: Test that closepath has no arguments

 rust/src/path_parser.rs | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/rust/src/path_parser.rs b/rust/src/path_parser.rs
index 132ba48..07eca05 100644
--- a/rust/src/path_parser.rs
+++ b/rust/src/path_parser.rs
@@ -1607,4 +1607,13 @@ mod tests {
                     &vec![moveto(10.0, -20.0)],
                     Some(ErrorKind::UnexpectedToken));
     }
+
+    #[test]
+    fn closepath_no_args() {
+        test_parser("M10-20z10",
+                    "       ^",
+                    &vec![moveto(10.0, -20.0),
+                          closepath()],
+                    Some(ErrorKind::UnexpectedToken));
+    }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]