[librsvg: 10/28] path_parser: Test that the first command is a moveto
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 10/28] path_parser: Test that the first command is a moveto
- Date: Tue, 23 Jan 2018 18:00:04 +0000 (UTC)
commit 7ffc51fa1140ad6d21a126c518d0b90b99751156
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jan 23 09:56:35 2018 -0600
path_parser: Test that the first command is a moveto
rust/src/path_parser.rs | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/rust/src/path_parser.rs b/rust/src/path_parser.rs
index d2fc1a7..d7cccdc 100644
--- a/rust/src/path_parser.rs
+++ b/rust/src/path_parser.rs
@@ -1520,4 +1520,12 @@ mod tests {
* Maybe we need to represent arcs as native path builder segments,
* and only explode them to Cairo curves at rendering time.
*/
+
+ #[test]
+ fn first_command_must_be_moveto() {
+ test_parser(" L10 20",
+ " ^",
+ &vec![],
+ Some(ErrorKind::UnexpectedToken));
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]