tests/testthat/test-bind_or.R

context("Checking bind_or")

test_that("bind_or binds and `or` concatenate elements",{

    expect_equal(bind_or("them", "those", "that", "these"), 
        "(\\bthem\\b|\\bthose\\b|\\bthat\\b|\\bthese\\b)")
    
    expect_equal(bind_or("them", "those", "that", "these", group.all = FALSE),
        "\\bthem\\b|\\bthose\\b|\\bthat\\b|\\bthese\\b")
})

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.