From 50cef53b74562238b31f2d1d8c385339c1f4f432 Mon Sep 17 00:00:00 2001 From: Oliver Keyes Date: Sun, 24 Dec 2017 19:48:15 -0800 Subject: [PATCH] Prepare for release --- DESCRIPTION | 2 +- tests/testthat/test_encoding.R | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8fe2a17..d5cb087 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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] diff --git a/tests/testthat/test_encoding.R b/tests/testthat/test_encoding.R index 89450b3..f1b8f70 100644 --- a/tests/testthat/test_encoding.R +++ b/tests/testthat/test_encoding.R @@ -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))) + } }) \ No newline at end of file