Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Keyes committed Dec 25, 2017
1 parent ff6869a commit 50cef53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: urltools
Type: Package
Title: Vectorised Tools for URL Handling and Parsing
Version: 1.7.0
Date: 2017-12-09
Date: 2017-12-24
Author: Oliver Keyes [aut, cre], Jay Jacobs [aut, cre], Drew Schmidt [aut],
Mark Greenaway [ctb], Bob Rudis [ctb], Alex Pinto [ctb], Maryam Khezrzadeh [ctb], Peter Meilstrup [ctb],
Adam M. Costello [cph], Jeff Bezanson [cph], Peter Meilstrup [ctb]
Expand Down
13 changes: 7 additions & 6 deletions tests/testthat/test_encoding.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ test_that("Check decoding can handle NAs", {
expect_that(url_decode(c("https://foo.org/bar%2f", NA)), equals(c("https://foo.org/bar/", NA)))
})

# Add comment for windows trickery
test_that("Check decoding and encoding are equivalent", {

url <- "Hinrichtung_auf_dem_Altst%c3%a4dter_Ring.JPG%2f120px-Hinrichtung_auf_dem_Altst%c3%a4dter_Ring.JPG"
decoded_url <- "Hinrichtung_auf_dem_Altstädter_Ring.JPG/120px-Hinrichtung_auf_dem_Altstädter_Ring.JPG"
expect_that(url_decode(url), equals(decoded_url))
expect_that(url_encode(decoded_url), equals(url))

if(.Platform$OS.type == "unix"){
url <- "Hinrichtung_auf_dem_Altst%c3%a4dter_Ring.JPG%2f120px-Hinrichtung_auf_dem_Altst%c3%a4dter_Ring.JPG"
decoded_url <- "Hinrichtung_auf_dem_Altstädter_Ring.JPG/120px-Hinrichtung_auf_dem_Altstädter_Ring.JPG"
expect_that((url_decode(url)), equals((decoded_url)))
expect_that((url_encode(decoded_url)), equals((url)))
}
})

0 comments on commit 50cef53

Please sign in to comment.