# Generated by roxytest: Do not edit by hand!
# File R/regex_patterns.R: @tests
test_that("Function reg_date_exact() @ L114", {
expect_equal(grepl(reg_date_exact(), "14 JAN 2005"), TRUE)
expect_equal(grepl(reg_date_exact(), "14 JAM 2005"), FALSE)
expect_equal(grepl(reg_date_exact(), "JAN 2005"), FALSE)
expect_equal(grepl(reg_date_exact(), "14 JAN 2005/06"), FALSE)
expect_equal(grepl(reg_date_exact(), "5 JUL 2005"), TRUE)
expect_equal(grepl(reg_date_exact(), "8 NOV 1956/57"), FALSE)
expect_equal(grepl(reg_date_exact(), "2005"), FALSE)
expect_equal(grepl(reg_date_exact(), "15 NOV 125"), FALSE)
expect_equal(grepl(reg_date_exact(), "JAN 1901/58"), FALSE)
expect_equal(grepl(reg_date_exact(), "5 JUL 2005 "), FALSE)
expect_equal(grepl(reg_date_exact(), " 5 JUL 2005"), FALSE)
})
test_that("Function reg_date() @ L146", {
expect_equal(grepl(reg_date(), "14 JAN 2005"), TRUE)
expect_equal(grepl(reg_date(), "14 JAM 2005"), FALSE)
expect_equal(grepl(reg_date(), "JAN 2005"), TRUE)
expect_equal(grepl(reg_date(), "14 JAN 2005/06"), TRUE)
expect_equal(grepl(reg_date(), "5 JUL 2005"), TRUE)
expect_equal(grepl(reg_date(), "8 NOV 1956/57"), TRUE)
expect_equal(grepl(reg_date(), "2005"), TRUE)
expect_equal(grepl(reg_date(), "15 NOV 125"), FALSE)
expect_equal(grepl(reg_date(), "JAN 1901/58"), TRUE)
expect_equal(grepl(reg_date(), "5 JUL 2005 "), FALSE)
expect_equal(grepl(reg_date(), " 5 JUL 2005"), FALSE)
})
test_that("Function reg_date_period() @ L188", {
expect_equal(grepl(reg_date_period(), "FROM 14 JAN 2005"), TRUE)
expect_equal(grepl(reg_date_period(), "TO 14 JAM 2005"), FALSE)
expect_equal(grepl(reg_date_period(), "FROM JAN 2005"), TRUE)
expect_equal(grepl(reg_date_period(), "FROM 14 JAN 2005/06 TO 2007"), TRUE)
expect_equal(grepl(reg_date_period(), "TO 5 JUL 2005"), TRUE)
expect_equal(grepl(reg_date_period(), "TO 8 NOV 1956/57"), FALSE)
expect_equal(grepl(reg_date_period(), "FROM 2005"), TRUE)
expect_equal(grepl(reg_date_period(), "FROM 15 NOV 125"), FALSE)
expect_equal(grepl(reg_date_period(), " TO JAN 1901/58"), FALSE)
expect_equal(grepl(reg_date_period(), "FROM 5 JUL 2005 "), FALSE)
expect_equal(grepl(reg_date_period(), " TO 5 JUL 2005"), FALSE)
})
test_that("Function reg_date_range() @ L219", {
expect_equal(grepl(reg_date_range(), "BEF 14 JAN 2005"), TRUE)
expect_equal(grepl(reg_date_range(), "AFT 14 JAM 2005"), FALSE)
expect_equal(grepl(reg_date_range(), "BEF JAN 2005"), TRUE)
expect_equal(grepl(reg_date_range(), "BET 14 JAN 2005/06 AND 2007"), TRUE)
expect_equal(grepl(reg_date_range(), "AFT 5 JUL 2005"), TRUE)
expect_equal(grepl(reg_date_range(), "AFT 8 NOV 1956/57"), FALSE)
expect_equal(grepl(reg_date_range(), "BEF 2005"), TRUE)
expect_equal(grepl(reg_date_range(), "BEF 15 NOV 125"), FALSE)
expect_equal(grepl(reg_date_range(), " AFT JAN 1901/58"), FALSE)
expect_equal(grepl(reg_date_range(), "BEF 5 JUL 2005 "), FALSE)
expect_equal(grepl(reg_date_range(), " AFT 5 JUL 2005"), FALSE)
})
test_that("Function reg_date_approximated() @ L250", {
expect_equal(grepl(reg_date_approximated(), "ABT 14 JAN 2005"), TRUE)
expect_equal(grepl(reg_date_approximated(), "CAL 14 JAM 2005"), FALSE)
expect_equal(grepl(reg_date_approximated(), "EST JAN 2005"), TRUE)
expect_equal(grepl(reg_date_approximated(), "ABT 14 JAN 2005/06 AND 2007"), FALSE)
expect_equal(grepl(reg_date_approximated(), "EST 5 JUL 2005"), TRUE)
expect_equal(grepl(reg_date_approximated(), "CAL 8 NOV 1956/57"), FALSE)
expect_equal(grepl(reg_date_approximated(), "ABT 2005"), TRUE)
expect_equal(grepl(reg_date_approximated(), "CAL 15 NOV 125"), FALSE)
expect_equal(grepl(reg_date_approximated(), " EST JAN 1901/58"), FALSE)
expect_equal(grepl(reg_date_approximated(), "CAL 5 JUL 2005 "), FALSE)
expect_equal(grepl(reg_date_approximated(), " CAL 5 JUL 2005"), FALSE)
})
test_that("Function reg_date_value() @ L289", {
expect_equal(grepl(reg_date_value(), "14 JAN 2005"), TRUE)
expect_equal(grepl(reg_date_value(), "MAR 1901"), TRUE)
expect_equal(grepl(reg_date_value(), "2010"), TRUE)
expect_equal(grepl(reg_date_value(), "FROM 14 FEB 2005"), TRUE)
expect_equal(grepl(reg_date_value(), "TO JAN 2005"), TRUE)
expect_equal(grepl(reg_date_value(), "FROM 14 JAN 2005/06 TO 2007"), TRUE)
expect_equal(grepl(reg_date_value(), "BEF 5 JUL 2005"), TRUE)
expect_equal(grepl(reg_date_value(), "AFT 8 NOV 1956/57"), TRUE)
expect_equal(grepl(reg_date_value(), "BET 2005 AND MAR 2008"), TRUE)
expect_equal(grepl(reg_date_value(), "CAL 15 NOV 1925"), TRUE)
expect_equal(grepl(reg_date_value(), "EST JAN 1901/58"), TRUE)
expect_equal(grepl(reg_date_value(), "ABT 5 JUL 2005"), TRUE)
expect_equal(grepl(reg_date_value(), "14 JAN 205"), FALSE)
expect_equal(grepl(reg_date_value(), "MAR 1901 "), FALSE)
expect_equal(grepl(reg_date_value(), " 2010"), FALSE)
expect_equal(grepl(reg_date_value(), "FROM 14 FEBR 2005"), FALSE)
expect_equal(grepl(reg_date_value(), "TO JAN 2005"), FALSE)
expect_equal(grepl(reg_date_value(), "FROM 14 JAN 2005/06 AND 2007"), FALSE)
expect_equal(grepl(reg_date_value(), "BEF 5 JUL 2005 "), FALSE)
expect_equal(grepl(reg_date_value(), "AFT 8 NOV 1956/1957"), FALSE)
expect_equal(grepl(reg_date_value(), "BET 2005 TO MAR 2008"), FALSE)
expect_equal(grepl(reg_date_value(), "CAL 15 NOV 1925/"), FALSE)
expect_equal(grepl(reg_date_value(), "14TH JAN 1901/58"), FALSE)
expect_equal(grepl(reg_date_value(), "ABT 5 JUL 2005"), FALSE)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.