From 553c244d141a9b5e176ec1fa39c36e9121e63e9b Mon Sep 17 00:00:00 2001 From: George Moroz Date: Wed, 23 Aug 2023 20:05:30 +0300 Subject: [PATCH] v 1.1.15 --- R/is.glottolog.R | 3 +- codemeta.json | 40 ++++--------------- man/is.glottolog.Rd | 3 +- tests/testthat/test-abvd-feature.R | 1 + tests/testthat/test-afbo-feature.R | 1 + tests/testthat/test-aff-lang.R | 1 + tests/testthat/test-area-lang.R | 1 + tests/testthat/test-bantu-feature.R | 1 + tests/testthat/test-country-lang.R | 1 + .../testthat/test-eurasianphonology-feature.R | 1 + tests/testthat/test-glottolog-database.R | 12 +++--- tests/testthat/test-gltc-iso.R | 1 + tests/testthat/test-gltc-lang.R | 1 + tests/testthat/test-grambank-feature.R | 3 +- tests/testthat/test-iso-gltc.R | 1 + tests/testthat/test-iso-lang.R | 1 + tests/testthat/test-lang-aff.R | 1 + tests/testthat/test-lang-gltc.R | 1 + tests/testthat/test-lang-iso.R | 1 + tests/testthat/test-lat-lang.R | 1 + tests/testthat/test-level.lang.R | 1 + tests/testthat/test-long-lang.R | 1 + tests/testthat/test-mapfeature.R | 20 ++++++++++ tests/testthat/test-sails-feature.R | 1 + .../testthat/test-soundcomparisons-feature.R | 1 + tests/testthat/test-subc-lang.R | 1 + tests/testthat/test-url-lang.R | 1 + tests/testthat/test-vanuatu-feature.R | 1 + tests/testthat/test-wals-feature.R | 1 + 29 files changed, 64 insertions(+), 40 deletions(-) diff --git a/R/is.glottolog.R b/R/is.glottolog.R index 9fc54864..308dc51d 100755 --- a/R/is.glottolog.R +++ b/R/is.glottolog.R @@ -8,13 +8,14 @@ #' is.glottolog(c('Adyghe', 'Russian')) #' is.glottolog('Buyaka') #' +#' \dontrun{ #' # Add warning message with sugestions #' is.glottolog(c('Adygey', 'Russian'), response = TRUE) #' # > FALSE TRUE #' # Warning message: #' # In is.glottolog(c('Adyge', 'Russian'), response = TRUE) : #' # Language Adyge is absent in our version of the Glottolog database. Did you mean Aduge, Adyghe? -#' +#' } #' @export #' @importFrom stringdist stringdist #' diff --git a/codemeta.json b/codemeta.json index b2672357..9ff9e2c9 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,13 +8,13 @@ "codeRepository": "https://github.com/ropensci/lingtypology/", "issueTracker": "https://github.com/ropensci/lingtypology/issues", "license": "https://spdx.org/licenses/GPL-2.0", - "version": "1.1.9", + "version": "1.1.15", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", "url": "https://r-project.org" }, - "runtimePlatform": "R version 4.1.2 (2021-11-01)", + "runtimePlatform": "R version 4.3.1 (2023-06-16)", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", @@ -51,8 +51,8 @@ }, { "@type": "Person", - "givenName": "Sasha", - "familyName": "Shakhnova" + "givenName": "Ekaterina", + "familyName": "Zalivina" } ], "maintainer": [ @@ -139,39 +139,15 @@ }, { "@type": "SoftwareApplication", - "identifier": "rgeos", - "name": "rgeos", + "identifier": "sf", + "name": "sf", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=rgeos" - }, - { - "@type": "SoftwareApplication", - "identifier": "rgdal", - "name": "rgdal", - "provider": { - "@id": "https://cran.r-project.org", - "@type": "Organization", - "name": "Comprehensive R Archive Network (CRAN)", - "url": "https://cran.r-project.org" - }, - "sameAs": "https://CRAN.R-project.org/package=rgdal" - }, - { - "@type": "SoftwareApplication", - "identifier": "ggplot2", - "name": "ggplot2", - "provider": { - "@id": "https://cran.r-project.org", - "@type": "Organization", - "name": "Comprehensive R Archive Network (CRAN)", - "url": "https://cran.r-project.org" - }, - "sameAs": "https://CRAN.R-project.org/package=ggplot2" + "sameAs": "https://CRAN.R-project.org/package=sf" }, { "@type": "SoftwareApplication", @@ -258,7 +234,7 @@ }, "SystemRequirements": null }, - "fileSize": "2377.359KB", + "fileSize": "2227.264KB", "citation": [ { "@type": "SoftwareSourceCode", diff --git a/man/is.glottolog.Rd b/man/is.glottolog.Rd index 0341166d..1cadcf86 100755 --- a/man/is.glottolog.Rd +++ b/man/is.glottolog.Rd @@ -18,13 +18,14 @@ Takes any vector of languages or ISO codes and returns a logical vector. is.glottolog(c('Adyghe', 'Russian')) is.glottolog('Buyaka') +\dontrun{ # Add warning message with sugestions is.glottolog(c('Adygey', 'Russian'), response = TRUE) # > FALSE TRUE # Warning message: # In is.glottolog(c('Adyge', 'Russian'), response = TRUE) : # Language Adyge is absent in our version of the Glottolog database. Did you mean Aduge, Adyghe? - +} } \author{ George Moroz diff --git a/tests/testthat/test-abvd-feature.R b/tests/testthat/test-abvd-feature.R index 1f4c4f8c..979ef49f 100755 --- a/tests/testthat/test-abvd-feature.R +++ b/tests/testthat/test-abvd-feature.R @@ -1,5 +1,6 @@ library(lingtypology) test_that("abvd.feature", { + skip_on_cran() expect_error(abvd.feature(c("aa", "bb")), "You need to provide a numeric vector with language id from ABVD.") }) diff --git a/tests/testthat/test-afbo-feature.R b/tests/testthat/test-afbo-feature.R index f6643f6a..2ced42d0 100755 --- a/tests/testthat/test-afbo-feature.R +++ b/tests/testthat/test-afbo-feature.R @@ -2,6 +2,7 @@ library(lingtypology) context("Tests for afbo.feature function") test_that("afbo.feature", { + skip_on_cran() expect_error(afbo.feature(c("aa", "bb")), "There is no features 'aa', 'bb' in AfBo database.") }) diff --git a/tests/testthat/test-aff-lang.R b/tests/testthat/test-aff-lang.R index 1b63b94f..7080bbf1 100755 --- a/tests/testthat/test-aff-lang.R +++ b/tests/testthat/test-aff-lang.R @@ -1,6 +1,7 @@ df <- data.frame(my_langs = c("Korean", "Polish"), stringsAsFactors = FALSE) test_that("aff.lang", { + skip_on_cran() expect_equal(aff.lang("Korean"), c(Korean = "Koreanic")) expect_equal(aff.lang(c("Korean", "Polish")), c(Korean = "Koreanic", Polish = "Indo-European, Classical Indo-European, Balto-Slavic, Slavic, West Slavic, Lechitic, Polish-Silesian")) expect_equal(aff.lang(df), c(my_langs1 = "Koreanic", my_langs2 = "Indo-European, Classical Indo-European, Balto-Slavic, Slavic, West Slavic, Lechitic, Polish-Silesian")) diff --git a/tests/testthat/test-area-lang.R b/tests/testthat/test-area-lang.R index 335451be..dd9d40f3 100755 --- a/tests/testthat/test-area-lang.R +++ b/tests/testthat/test-area-lang.R @@ -4,6 +4,7 @@ context("Tests for area.lang function") df <- data.frame(my_langs = c("Korean", "Polish"), stringsAsFactors = FALSE) test_that("area.lang", { + skip_on_cran() expect_equal(area.lang("Adyghe"), c(Adyghe = "Eurasia")) expect_equal(area.lang(c("Adyghe", "Aduge")), c(Adyghe = "Eurasia", Aduge = "Africa")) expect_equal(area.lang(df), c(my_langs1 = "Eurasia", my_langs2 = "Eurasia")) diff --git a/tests/testthat/test-bantu-feature.R b/tests/testthat/test-bantu-feature.R index a84902ed..4cc51786 100644 --- a/tests/testthat/test-bantu-feature.R +++ b/tests/testthat/test-bantu-feature.R @@ -2,5 +2,6 @@ library(lingtypology) context("Tests for bantu.feature function") test_that("bantu.feature", { + skip_on_cran() expect_error(bantu.feature("aa"), "There is no features 'aa' in bantu database.") }) diff --git a/tests/testthat/test-country-lang.R b/tests/testthat/test-country-lang.R index b91ae475..eef9eebd 100755 --- a/tests/testthat/test-country-lang.R +++ b/tests/testthat/test-country-lang.R @@ -1,6 +1,7 @@ df <- data.frame(my_langs = c("Korean", "Polish"), stringsAsFactors = FALSE) test_that("country.lang", { + skip_on_cran() expect_equal(country.lang("Korean"), c(Korean = "China;South Korea;North Korea;Russia")) expect_equal(country.lang(c("Korean", "Polish")), c(Korean = "China;South Korea;North Korea;Russia", Polish = "Belarus;Czech;Germany;Lithuania;Poland;Russia")) expect_equal(country.lang(df), c(my_langs1 = "China;South Korea;North Korea;Russia", my_langs2 = "Belarus;Czech;Germany;Lithuania;Poland;Russia")) diff --git a/tests/testthat/test-eurasianphonology-feature.R b/tests/testthat/test-eurasianphonology-feature.R index f9640ba4..0bc976c3 100644 --- a/tests/testthat/test-eurasianphonology-feature.R +++ b/tests/testthat/test-eurasianphonology-feature.R @@ -2,4 +2,5 @@ library(testthat) context("Tests for eurasianphonology.feature function") test_that("eurasianphonology.feature", { + skip_on_cran() expect_length(eurasianphonology.feature(), 19)}) diff --git a/tests/testthat/test-glottolog-database.R b/tests/testthat/test-glottolog-database.R index 6a22ac47..a0ba3565 100755 --- a/tests/testthat/test-glottolog-database.R +++ b/tests/testthat/test-glottolog-database.R @@ -2,12 +2,14 @@ library(lingtypology) context("Tests for is.glottolog function") test_that("database part", { - expect_equal(is.glottolog("Adyghe"), TRUE) + skip_on_cran() + expect_equal(is.glottolog("Adyghe"), TRUE) }) test_that("is.glottolog spell checker", { - expect_that(warning(is.glottolog("Adyge")), gives_warning()) - expect_that(warning(is.glottolog("Adyge", response = TRUE)), gives_warning("Language Adyge is absent in our version of the Glottolog database. Did you mean Aduge, Adyghe, Abkhaz-Adyge?")) - expect_that(warning(is.glottolog("Romagnolo", response = TRUE)), gives_warning("Language Romagnolo is absent in our version of the Glottolog database. Did you mean Romagnol?")) - expect_that(warning(is.glottolog(c("Adyge", "Laz"), response = TRUE)), gives_warning("Language Adyge is absent in our version of the Glottolog database. Did you mean Aduge, Adyghe, Abkhaz-Adyge?")) + skip_on_cran() + expect_that(warning(is.glottolog("Adyge")), gives_warning()) + expect_that(warning(is.glottolog("Adyge", response = TRUE)), gives_warning("Language Adyge is absent in our version of the Glottolog database. Did you mean Aduge, Adyghe, Abkhaz-Adyge?")) + expect_that(warning(is.glottolog("Romagnolo", response = TRUE)), gives_warning("Language Romagnolo is absent in our version of the Glottolog database. Did you mean Romagnol?")) + expect_that(warning(is.glottolog(c("Adyge", "Laz"), response = TRUE)), gives_warning("Language Adyge is absent in our version of the Glottolog database. Did you mean Aduge, Adyghe, Abkhaz-Adyge?")) }) diff --git a/tests/testthat/test-gltc-iso.R b/tests/testthat/test-gltc-iso.R index 83bb7c35..d39d10e4 100755 --- a/tests/testthat/test-gltc-iso.R +++ b/tests/testthat/test-gltc-iso.R @@ -4,6 +4,7 @@ context("Tests for iso.gltc function") df <- data.frame(my_langs = c("ady", "udi"), stringsAsFactors = FALSE) test_that("iso.gltc", { + skip_on_cran() expect_equal(gltc.iso("ady"), c(ady = "adyg1241")) expect_equal(gltc.iso(c("ady", "udi")), c(ady = "adyg1241", udi = "udii1243")) expect_equal(gltc.iso(df), c(my_langs1 = "adyg1241", my_langs2 = "udii1243")) diff --git a/tests/testthat/test-gltc-lang.R b/tests/testthat/test-gltc-lang.R index 748e90e9..92b71a59 100755 --- a/tests/testthat/test-gltc-lang.R +++ b/tests/testthat/test-gltc-lang.R @@ -4,6 +4,7 @@ context("Tests for gltc.lang function") df <- data.frame(my_langs = c("Adyghe", "Udi"), stringsAsFactors = FALSE) test_that("gltc.lang", { + skip_on_cran() expect_equal(gltc.lang("Adyghe"), c(Adyghe = "adyg1241")) expect_equal(gltc.lang(c("Adyghe", "Udi")), c(Adyghe = "adyg1241", Udi = "udii1243")) expect_equal(gltc.lang(df), c(my_langs1 = "adyg1241", my_langs2 = "udii1243")) diff --git a/tests/testthat/test-grambank-feature.R b/tests/testthat/test-grambank-feature.R index d4705672..4a998253 100755 --- a/tests/testthat/test-grambank-feature.R +++ b/tests/testthat/test-grambank-feature.R @@ -1,7 +1,8 @@ library(lingtypology) context("Tests for grambank.feature function") -test_that("wals.feature", { +test_that("grambank.feature", { + skip_on_cran() expect_error(grambank.feature(c("aa", "bb")), "There is no features 'aa', 'bb' in Grambank database.") }) diff --git a/tests/testthat/test-iso-gltc.R b/tests/testthat/test-iso-gltc.R index e53ba262..fc105cc8 100755 --- a/tests/testthat/test-iso-gltc.R +++ b/tests/testthat/test-iso-gltc.R @@ -4,6 +4,7 @@ context("Tests for iso.gltc function") df <- data.frame(my_langs = c("adyg1241", "udii1243"), stringsAsFactors = FALSE) test_that("iso.gltc", { + skip_on_cran() expect_equal(iso.gltc("adyg1241"), c(adyg1241 = "ady")) expect_equal(iso.gltc(c("adyg1241", "udii1243")), c(adyg1241 = "ady", udii1243 = "udi")) expect_equal(iso.gltc(df), c(my_langs1 = "ady", my_langs2 = "udi")) diff --git a/tests/testthat/test-iso-lang.R b/tests/testthat/test-iso-lang.R index bfaf4d5b..ed17d373 100755 --- a/tests/testthat/test-iso-lang.R +++ b/tests/testthat/test-iso-lang.R @@ -4,6 +4,7 @@ context("Tests for iso.lang function") df <- data.frame(my_langs = c("Adyghe", "Udi"), stringsAsFactors = FALSE) test_that("iso.lang", { + skip_on_cran() expect_equal(iso.lang("Adyghe"), c(Adyghe = "ady")) expect_equal(iso.lang(c("Adyghe", "Udi")), c(Adyghe = "ady", Udi = "udi")) expect_equal(iso.lang(df), c(my_langs1 = "ady", my_langs2 = "udi")) diff --git a/tests/testthat/test-lang-aff.R b/tests/testthat/test-lang-aff.R index 1b7c9497..a6ed2cad 100755 --- a/tests/testthat/test-lang-aff.R +++ b/tests/testthat/test-lang-aff.R @@ -3,6 +3,7 @@ library(lingtypology) df <- data.frame(my_langs = c("Baltic"), stringsAsFactors = FALSE) test_that("lang.aff", { + skip_on_cran() expect_equal(lang.aff("Baltic"), c("Lithuanian", "Latvian")) expect_equal(lang.aff(df), c(my_langs1 = "Lithuanian", my_langs2 = "Latvian")) diff --git a/tests/testthat/test-lang-gltc.R b/tests/testthat/test-lang-gltc.R index 27d8126f..525906cc 100755 --- a/tests/testthat/test-lang-gltc.R +++ b/tests/testthat/test-lang-gltc.R @@ -4,6 +4,7 @@ context("Tests for lang.gltc function") df <- data.frame(my_langs = c("adyg1241", "russ1263"), stringsAsFactors = FALSE) test_that("lang.gltc", { + skip_on_cran() expect_equal(lang.gltc("adyg1241"), c(adyg1241 = "Adyghe")) expect_equal(lang.gltc(df), c(my_langs1 = "Adyghe", my_langs2 = "Russian")) expect_equal(lang.gltc(c("adyg1241", "russ1263")), c(adyg1241 = "Adyghe", russ1263 = "Russian")) diff --git a/tests/testthat/test-lang-iso.R b/tests/testthat/test-lang-iso.R index 283a9fd5..dd5d5f95 100755 --- a/tests/testthat/test-lang-iso.R +++ b/tests/testthat/test-lang-iso.R @@ -4,6 +4,7 @@ context("Tests for lang.iso function") df <- data.frame(my_langs = c("ady", "rus"), stringsAsFactors = FALSE) test_that("lang.iso", { + skip_on_cran() expect_equal(lang.iso("ady"), c(ady = "Adyghe")) expect_equal(lang.iso(df), c(my_langs1 = "Adyghe", my_langs2 = "Russian")) expect_equal(lang.iso(c("ady", "rus")), c(ady = "Adyghe", rus = "Russian")) diff --git a/tests/testthat/test-lat-lang.R b/tests/testthat/test-lat-lang.R index 05b77f36..c163faab 100755 --- a/tests/testthat/test-lat-lang.R +++ b/tests/testthat/test-lat-lang.R @@ -4,6 +4,7 @@ context("Tests for lat.lang function") df <- data.frame(my_langs = c("Adyghe", "Russian"), stringsAsFactors = FALSE) test_that("lat.lang", { + skip_on_cran() expect_equal(lat.lang("Adyghe"), c(Adyghe = 44)) expect_equal(lat.lang(df), c(my_langs1 = 44, my_langs2 = 59)) expect_equal(lat.lang(c("Adyghe", "Russian")), c(Adyghe = 44, Russian = 59)) diff --git a/tests/testthat/test-level.lang.R b/tests/testthat/test-level.lang.R index a5fdfaf6..60dfc123 100644 --- a/tests/testthat/test-level.lang.R +++ b/tests/testthat/test-level.lang.R @@ -4,6 +4,7 @@ context("Tests for level.lang function") df <- data.frame(my_langs = c("Adyghe", "Russian Sign Language"), stringsAsFactors = FALSE) test_that("lang.gltc", { + skip_on_cran() expect_equal(level.lang("Adyghe"), c(Adyghe = "language")) expect_equal(level.lang(df), c(my_langs1 = "language", my_langs2 = "dialect")) expect_equal(level.lang(c("Adyghe", "Russian Sign Language")), c(Adyghe = "language", `Russian Sign Language` = "dialect")) diff --git a/tests/testthat/test-long-lang.R b/tests/testthat/test-long-lang.R index ca295d46..1caee1a8 100755 --- a/tests/testthat/test-long-lang.R +++ b/tests/testthat/test-long-lang.R @@ -4,6 +4,7 @@ context("Tests for long.lang function") df <- data.frame(my_langs = c("Adyghe", "Russian"), stringsAsFactors = FALSE) test_that("long.lang", { + skip_on_cran() expect_equal(long.lang("Adyghe"), c(Adyghe = 39.33)) expect_equal(long.lang(c("Adyghe", "Russian")), c(Adyghe = 39.33, Russian = 50)) expect_equal(long.lang(df), c(my_langs1 = 39.33, my_langs2 = 50)) diff --git a/tests/testthat/test-mapfeature.R b/tests/testthat/test-mapfeature.R index 8bd2cb98..25860da5 100755 --- a/tests/testthat/test-mapfeature.R +++ b/tests/testthat/test-mapfeature.R @@ -5,17 +5,20 @@ map <- map.feature("Abkhaz") map3 <- map.feature(data.frame("Abkhaz", stringsAsFactors = FALSE)) test_that("map.feature source", { + skip_on_cran() expect_equal(exists("map"), TRUE) expect_equal(exists("map"), TRUE) expect_equal(exists("map3"), TRUE) }) test_that("map.feature no coordinates", { + skip_on_cran() expect_warning(map.feature(c("Yugul", "Adyghe", "Selako")), "There is no coordinates for languages Yugul, Selako") }) test_that("map.feature no data to map", { + skip_on_cran() expect_error( expect_warning( map.feature("bla-bla-bla"), @@ -29,6 +32,7 @@ test_that("map.feature no data to map", { map_coord <- map.feature("Abkhaz", latitude = 43, longitude = 57) test_that("map.feature coordinates", { + skip_on_cran() expect_equal(map$x$limits[[1]][1], unname(lat.lang("Abkhaz"))) expect_equal(map$x$limits[[2]][1], unname(long.lang("Abkhaz"))) expect_equal(map_coord$x$limits[[1]][1], 43) @@ -76,6 +80,7 @@ density4 <- map.feature( ) test_that("map.feature density estimation", { + skip_on_cran() expect_equal(exists("density1"), TRUE) expect_equal(exists("density2"), TRUE) expect_equal(exists("density3"), TRUE) @@ -85,6 +90,7 @@ map_image <- map.feature("Tabasaran", image.url = "https://goo.gl/Ycn6tJ") test_that("map.feature images", { + skip_on_cran() expect_equal(map_image$x$calls[[4]]$args[[3]]$iconUrl$data, "https://goo.gl/Ycn6tJ") }) @@ -111,6 +117,7 @@ map_stroke2 <- ) test_that("map.feature stroke feature", { + skip_on_cran() expect_equal(length(map_stroke$x$calls), 9) expect_equal( map_stroke2$x$calls[[4]]$args[[6]]$fillColor, @@ -136,6 +143,7 @@ map_colorless2 <- map.feature(c("Tabasaran", "Adyghe"), features = c(1, 2)) test_that("map.feature colors", { + skip_on_cran() expect_equal(map_colors$x$calls[[3]]$args[6][[1]]$fillColor, c("#000080", "#9ACD32")) expect_equal(map_colors2$x$calls[[3]]$args[6][[1]]$fillColor, c("#000080", "#9ACD32")) expect_equal(map_colorless$x$calls[[3]]$args[6][[1]]$fillColor, @@ -161,6 +169,7 @@ map_tiles_control <- ) test_that("map.feature tiles", { + skip_on_cran() expect_equal( c(map_tiles$x$calls[[2]]$args[[1]], map_tiles$x$calls[[3]]$args[[1]]), c( @@ -203,22 +212,26 @@ map_control <- map.feature(c("Adyghe", "Russian", "Polish"), control = c("a", "b", "b")) test_that("control", { + skip_on_cran() expect_equal(map_control$x$calls[[4]]$method, "addLayersControl") }) map_minimap <- map.feature(c("Adyghe", "Russian"), minimap = TRUE) test_that("map.feature minimap", { + skip_on_cran() expect_equal(map_minimap$x$calls[[5]]$method, "addMiniMap") }) test_that("map.feature scale bar", { + skip_on_cran() expect_equal(map_minimap$x$calls[[4]]$method, "addScaleBar") }) map_label <- map.feature(c("Adyghe", "Russian"), label = c("a", "b")) test_that("map.feature labels", { + skip_on_cran() expect_equal(map_label$x$calls[[3]]$args[11], list(c("a", "b"))) }) @@ -229,6 +242,7 @@ map_label_emph <- label.emphasize = list(1, "red") ) test_that("map.feature emphasized labels", { + skip_on_cran() expect_equal(map_label_emph$x$calls[[4]]$args[11], list(c("a"))) expect_equal(map_label_emph$x$calls[[4]]$args[12][[1]]$style$color, "red") }) @@ -251,6 +265,7 @@ map_rectangular <- ) test_that("map.feature rectangular", { + skip_on_cran() expect_equal(map_rectangular$x$calls[[3]]$method, "addRectangles") }) @@ -262,6 +277,7 @@ map_minicharts <- ) test_that("map.feature minicharts", { + skip_on_cran() expect_equal(exists("map_minicharts"), TRUE) }) @@ -283,6 +299,7 @@ line.logit <- map.feature( ) test_that("map.feature lines", { + skip_on_cran() expect_equal(line$x$calls[[3]]$method, "addPolylines") expect_equal(line.logit$x$calls[[3]]$method, "addPolylines") expect_warning( @@ -300,6 +317,7 @@ test_that("map.feature lines", { graticule <- map.feature(c("Russian", "Adyghe"), graticule = 5) test_that("map.feature graticule", { + skip_on_cran() expect_equal(graticule$x$calls[[3]]$method, "addSimpleGraticule") }) @@ -315,6 +333,7 @@ shape3 <- map.feature(df$lang, shape = c("p", "p", "f", "f", "f")) test_that("map.feature shape", { + skip_on_cran() expect_equal(shape1$x$calls[[3]]$args[[11]], c("▴", "▴", "●", "●", "●")) expect_equal(shape2$x$calls[[3]]$args[[11]], c("p", "p", "f", "f", "f")) expect_equal(shape3$x$calls[[3]]$args[[11]], c("p", "p", "f", "f", "f")) @@ -328,6 +347,7 @@ test_that("map.feature shape", { map_none_tile <- map.feature("Adyghe", tile = "none") test_that("map without a tile", { + skip_on_cran() expect_equal(exists("map_none_tile"), TRUE) }) diff --git a/tests/testthat/test-sails-feature.R b/tests/testthat/test-sails-feature.R index 5d179b56..c5d69571 100755 --- a/tests/testthat/test-sails-feature.R +++ b/tests/testthat/test-sails-feature.R @@ -2,5 +2,6 @@ library(lingtypology) context("Tests for sails.feature function") test_that("sails.feature", { + skip_on_cran() expect_error(sails.feature(c("aa", "bb")), "There is no features 'aa', 'bb' in SAILS database.") }) diff --git a/tests/testthat/test-soundcomparisons-feature.R b/tests/testthat/test-soundcomparisons-feature.R index d18bbaa5..b2198873 100644 --- a/tests/testthat/test-soundcomparisons-feature.R +++ b/tests/testthat/test-soundcomparisons-feature.R @@ -2,5 +2,6 @@ library(lingtypology) context("Tests for soundcomparisons.feature function") test_that("soundcomparisons.feature", { + skip_on_cran() expect_error(soundcomparisons.feature(c("aa", "bb")), "There is no features 'aa', 'bb' in our version of the soundcomparisons database.") }) diff --git a/tests/testthat/test-subc-lang.R b/tests/testthat/test-subc-lang.R index 9b6ded11..769eba0f 100755 --- a/tests/testthat/test-subc-lang.R +++ b/tests/testthat/test-subc-lang.R @@ -1,6 +1,7 @@ df <- data.frame(my_langs = c("Korean", "Lechitic"), stringsAsFactors = FALSE) test_that("subc.lang", { + skip_on_cran() expect_equal(subc.lang("Korean"), c(Korean = "((Jollado:1,Kyongsangdo:1)chol1288:1,(Ch'ungch'ongdo:1,Hwanghaedo:1)chun1248:1,(Hamgyongdo:1,P'yong'ando:1)hamg1239:1,(Early_Middle_Korean:1,Late_Middle_Korean:1)midd1372:1,Seoul:1)kore1280:1;")) expect_equal(subc.lang(c("Korean", "Lechitic")), c(Korean = "((Jollado:1,Kyongsangdo:1)chol1288:1,(Ch'ungch'ongdo:1,Hwanghaedo:1)chun1248:1,(Hamgyongdo:1,P'yong'ando:1)hamg1239:1,(Early_Middle_Korean:1,Late_Middle_Korean:1)midd1372:1,Seoul:1)kore1280:1;", Lechitic = "((Kashubian_Proper:1,Slovincian:1)kash1274:1,Polabian:1,((Great_Poland:1,Little_Poland:1,Old_Polish:1)poli1260:1,Silesian:1)poli1262:1)lech1241:1;")) diff --git a/tests/testthat/test-url-lang.R b/tests/testthat/test-url-lang.R index 2dc68088..b186f73c 100755 --- a/tests/testthat/test-url-lang.R +++ b/tests/testthat/test-url-lang.R @@ -4,6 +4,7 @@ context("Tests for makelink function") df <- data.frame(my_langs = c("Adyghe"), stringsAsFactors = FALSE) test_that("makelink", { + skip_on_cran() expect_equal(url.lang("Adyghe"), "Adyghe
") expect_equal(url.lang(df), "Adyghe
") expect_equal(url.lang("Hachijo"), "Hachijo
") diff --git a/tests/testthat/test-vanuatu-feature.R b/tests/testthat/test-vanuatu-feature.R index e6b74f7b..1b848fb6 100644 --- a/tests/testthat/test-vanuatu-feature.R +++ b/tests/testthat/test-vanuatu-feature.R @@ -2,5 +2,6 @@ library(lingtypology) context("Tests for vanuatu.feature function") test_that("vanuatu.feature", { + skip_on_cran() expect_error(vanuatu.feature(c("aa", "bb")), "None of the parameters are in the vanuatu database.") }) diff --git a/tests/testthat/test-wals-feature.R b/tests/testthat/test-wals-feature.R index c75d1a9a..60feeee5 100755 --- a/tests/testthat/test-wals-feature.R +++ b/tests/testthat/test-wals-feature.R @@ -2,6 +2,7 @@ library(lingtypology) context("Tests for wals.feature function") test_that("wals.feature", { + skip_on_cran() expect_error(wals.feature(c("aa", "bb")), "There is no features 'aa', 'bb' in WALS database.") })