tests/testthat/test_githubURLParts.R

context("githubURLParts")
library(BiocPkgTools)

urls = c("https://github.com/kevinrue/TVTB",
         "https://github.com/ronammar/zFPKM/",
         "https://github.com/ronammar/zFPKM/extrastuff/abc")
ghp = githubURLParts(urls)


test_that("returns data frame and columns correctly", {
    expect_equal(nrow(ghp), 3)
    expect_equal(ncol(ghp), 4)
})

test_that("handles extra stuff in URL appropriately", {
    expect_equivalent(ghp[3, 4, drop=TRUE], 'zFPKM')
    expect_equivalent(ghp[2, 4, drop=TRUE], 'zFPKM')
})

Try the BiocPkgTools package in your browser

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

BiocPkgTools documentation built on April 15, 2021, 6:01 p.m.