[librsvg: 13/28] path_parser: Test that moveto gets the correct number of arguments
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 13/28] path_parser: Test that moveto gets the correct number of arguments
- Date: Tue, 23 Jan 2018 18:00:19 +0000 (UTC)
commit be2415d45c650d1e24a19e97adacbbcec6b16292
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jan 23 10:20:01 2018 -0600
path_parser: Test that moveto gets the correct number of arguments
rust/src/path_parser.rs | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/rust/src/path_parser.rs b/rust/src/path_parser.rs
index 10cecfd..04b47e9 100644
--- a/rust/src/path_parser.rs
+++ b/rust/src/path_parser.rs
@@ -1588,5 +1588,23 @@ mod tests {
" ^",
&vec![],
Some(ErrorKind::UnexpectedEof));
+
+ test_parser("M10x",
+ " ^",
+ &vec![],
+ Some(ErrorKind::UnexpectedToken));
+ }
+
+ #[test]
+ fn moveto_implicit_lineto_args() {
+ test_parser("M10-20-30",
+ " ^",
+ &vec![moveto(10.0, -20.0)],
+ Some(ErrorKind::UnexpectedEof));
+
+ test_parser("M10-20-30 x",
+ " ^",
+ &vec![moveto(10.0, -20.0)],
+ Some(ErrorKind::UnexpectedToken));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]