tests/testthat/test-grab.R

context("Checking grab")

test_that("grab gets strings",{

	expect_equivalent(grab("@split_keep_delim"), "(?<=[^%s])(?=[%s])")
    expect_equivalent(grab("@rm_percent"), "\\(?[0-9.]+\\)?%")
    expect_equivalent(grab("rm_percent"), "\\(?[0-9.]+\\)?%")	
    expect_error(grab("@foo"))
})

Try the qdapRegex package in your browser

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

qdapRegex documentation built on Oct. 17, 2023, 5:06 p.m.