tests/testthat/test.badnex.R

#
# --- Test badnex.R ---
#

test_that("Malformed Nexus File should not work.", {
    if (Sys.getenv("RCMDCHECK") == FALSE) {
        pth <- file.path(getwd(), "..", "inst", "nexusfiles")
    } else {
        pth <- system.file(package="rncl", "nexusfiles")
    }
    badFile <- file.path(pth, "badnex.nex")
    stopifnot(file.exists(badFile))
    expect_error(read_nexus_phylo(file=badFile))
})

Try the rncl package in your browser

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

rncl documentation built on Jan. 9, 2023, 1:28 a.m.