-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workaround for anchor links (#367)
Bug in libcurl 8.11.1 and lower: curl/curl#15836
- Loading branch information
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,13 @@ test_that("Basic URL parser",{ | |
}) | ||
|
||
test_that("Relative links need a baseurl",{ | ||
base <- 'https://jerry:[email protected]:888/foo/bar#nothing' | ||
base <- 'https://jerry:[email protected]:888/foo/bar?x=1#nothing' | ||
out1 <- curl_parse_url("/test1", base) #NB: curl does but ADA does not have nice error messages | ||
out2 <- curl_parse_url("./test2", base) | ||
out3 <- curl_parse_url("#bla", base) | ||
expect_equal(out1$url, "https://jerry:[email protected]:888/test1") | ||
expect_equal(out2$url, "https://jerry:[email protected]:888/foo/test2") | ||
expect_equal(out3$url, "https://jerry:[email protected]:888/foo/bar?x=1#bla") | ||
expect_error(curl_parse_url("/test1")) | ||
expect_error(curl_parse_url("./test2")) | ||
}) | ||
|
@@ -49,4 +51,3 @@ test_that("Decoding parameters", { | |
out <- curl_parse_url('https://www.test.com/bla?tv=tom%26jerry&math=1%2B1+%3D+2&empty') | ||
expect_equal(out$params, c(tv = "tom&jerry", math = "1+1 = 2", empty = "")) | ||
}) | ||
|