parseQueryString: ignore extra ampersands

This commit is contained in:
Winston Chang
2016-06-09 13:01:36 -05:00
committed by Joe Cheng
parent f38fe7d488
commit 87309a64d2
2 changed files with 4 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ test_that("Query string parsing", {
# Should be the same with or without leading question mark
expect_identical(parseQueryString("?foo=1&bar=b"), parseQueryString("foo=1&bar=b"))
# Leading/trailing/consecutive ampersands are ignored
expect_identical(parseQueryString("?&a=1&&b=2&"), parseQueryString("?a=1&b=2"))
# Nested and non-nested query strings
expect_identical(