tests/testthat/test_check_redbook.R

test_that("check_redbook returns correct output for tax_status = TRUE", {
  splist <- c("Aphelandra cuscoenses",
              "Piper stevensi",
              "Sanchezia ovata",
              "Verbesina andina",
              "Festuca dentiflora",
              "Eucrosia bicolor var. plowmanii",
              "Hydrocotyle bonplandii var. hirtipes",
              "Persea americana")
  expected_output <- c("endemic", "endemic", "not endemic",
                       "endemic", "endemic",
                       "endemic", "endemic", "not endemic")

  actual_output <- check_redbooklist(splist, dist = 0.2)
  expect_equal(actual_output, expected_output)
})

Try the redbookperu package in your browser

Any scripts or data that you put into this service are public.

redbookperu documentation built on July 2, 2024, 9:07 a.m.