tests/testthat/test-util-testing.R

#! This file was automatically produced by the testextra package.
#! Changes will be overwritten.

context('tests extracted from file `util-testing.R`')
#line 14 "R/util-testing.R"
test_that('is_valid_regex', {#@testing
    expect_true(is_valid_regex("^hello world$"))
    expect_false(is_valid_regex("^hello (world$"))
    expect_identical( validate_that(is_valid_regex("^hello (world$"))
                    , "invalid regular expression " %<<<%
                      "'^hello (world$', reason 'Missing ')''"
                    )
})

Try the testextra package in your browser

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

testextra documentation built on Dec. 18, 2019, 9:38 a.m.