[librsvg: 17/28] path_parser: Test horizontal lineto args
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 17/28] path_parser: Test horizontal lineto args
- Date: Tue, 23 Jan 2018 18:00:39 +0000 (UTC)
commit fe1e6a48def4624fcddf55cb185e317c88f8939a
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jan 23 10:34:40 2018 -0600
path_parser: Test horizontal lineto args
rust/src/path_parser.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/rust/src/path_parser.rs b/rust/src/path_parser.rs
index 1236510..00a99bf 100644
--- a/rust/src/path_parser.rs
+++ b/rust/src/path_parser.rs
@@ -1630,4 +1630,17 @@ mod tests {
lineto(20.0, 20.0)],
Some(ErrorKind::UnexpectedEof));
}
+
+ #[test]
+ fn horizontal_lineto_args() {
+ test_parser("M10-20H",
+ " ^",
+ &vec![moveto(10.0, -20.0)],
+ Some(ErrorKind::UnexpectedEof));
+
+ test_parser("M10-20H,",
+ " ^",
+ &vec![moveto(10.0, -20.0)],
+ Some(ErrorKind::UnexpectedToken));
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]