tests/testthat/test-group_or.R

context("Checking group_or")

test_that("group_or groups and `or` concatenate elements",{

    expect_equal(group_or("them", "those", "that", "these"), 
        "((them)|(those)|(that)|(these))")
    
    expect_equal(group_or("them", "those", "that", "these", group.all = FALSE),
        "(them)|(those)|(that)|(these)")
})

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.