context("Finding inputs")
test_that("El caso básico funciona", {
varlist <- c("cise_", "region_re_")
src <- "casen"
year <- 2003
month <- 1
inputs <- c("o9", "r", "comu")
expect_equal(find_inputs(varlist, src, year, month), inputs)
})
test_that("Si la variable no existe, la función falla y dice por qué", {
varlist <- c("cise_")
src <- "casen"
year <- 2000
month <- 1
inputs <- c("cise_ not found in dictionary")
expect_error(find_inputs(varlist, src, year, month), inputs)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.