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="phylobase", "nexusfiles")
    }
    badFile <- file.path(pth, "badnex.nex")
    expect_error(readNexus(file=badFile))
})

Try the phylobase package in your browser

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

phylobase documentation built on May 2, 2019, 6:49 p.m.