summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSam Scott <sam.scott89@gmail.com>2017-10-31 23:07:39 +0000
committerSam Scott <sam.scott89@gmail.com>2017-10-31 23:07:39 +0000
commit8a18724f53ac35095ed603a2fb259f0abdf56daf (patch)
treeafd9b194fea2110c6a3336a136a07d399c0d1af3 /tests
parentd858a267697da48d56e099eac6860f5ab8e69e46 (diff)
New parsing strategy.
- Only perform the percent decoding at the final step (fixes #10). - Reduce allocations by borrowing as much as possible.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_deserialize.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_deserialize.rs b/tests/test_deserialize.rs
index 6d5cc9b..58cf256 100644
--- a/tests/test_deserialize.rs
+++ b/tests/test_deserialize.rs
@@ -378,4 +378,11 @@ fn seq_of_struct() {
assert_eq!(rec_params,
Query { b: vec![Test { a: 1 }, Test { a: 2 }] }
);
+}
+
+#[test]
+fn correct_decoding() {
+ map_test!("foo=%24", "foo"["$"]);
+
+ map_test!("foo=%26", "foo"["&"]);
} \ No newline at end of file