summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarkus Unterwaditzer <markus@unterwaditzer.net>2014-11-13 21:08:08 +0100
committerMarkus Unterwaditzer <markus@unterwaditzer.net>2014-11-13 21:08:08 +0100
commit9f3a475e52bbbacea1ddefaa8307a74f870b9fc8 (patch)
tree95a3b551b6c9c4cdd06b461589641d0da42a768a /tests
parent01b405173c61b937f1b1ccfd125c21ea2d5624b0 (diff)
Parse parameters
Diffstat (limited to 'tests')
-rw-r--r--tests/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib.rs b/tests/lib.rs
index 80070d1..e182f10 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -79,3 +79,13 @@ fn test_icalendar_basic() {
assert!(event.single_prop(s!("ORGANIZER")).is_some());
assert_eq!(event.single_prop(s!("LOCATION")).unwrap().get_raw_value(), s!("Somewhere"));
}
+
+#[test]
+fn test_escaping() {
+ let item = parse_component(s!(
+ "BEGIN:VCALENDAR\n\
+ ORGANIZER;CN=\"Cott:n Eye Joe\":mailto:joe@joe.com\n\
+ END:VCALENDAR\n")).unwrap();
+ assert_eq!(&item.name, s!("VCALENDAR"));
+ assert_eq!(item.single_prop(s!("ORGANIZER")).unwrap().get_raw_value(), s!("mailto:joe@joe.com"));
+}