test_that(".get_gmw works", { skip_on_cran() aoi <- read_sf( system.file("extdata", "shell_beach_protected_area_41057_B.gpkg", package = "mapme.biodiversity" ) ) aoi <- suppressWarnings(st_cast(aoi, to = "POLYGON")[1, ]) temp_loc <- file.path(tempdir(), "mapme.biodiversity") dir.create(temp_loc, showWarnings = FALSE) resource_dir <- system.file("res", package = "mapme.biodiversity") file.copy(resource_dir, temp_loc, recursive = TRUE) outdir <- file.path(tempdir(), "mapme.biodiversity", "res") tmpdir <- tempdir() mapme_options( outdir = outdir, tmpdir = tmpdir, verbose = FALSE, testing = TRUE ) gmw <- get_gmw(years = 2007:2008) expect_equal(gmw(), c("gmw-extent_2007.zip", "gmw-extent_2008.zip")) })