tests/testthat/setup-all.R

ph_raw <- c(0, 0123, "0412 345 678", "61412987654", "03 9123 4567", "+12015550123")
ph_raw_regions <- c(NA, NA, "AU", "AU", "AU", "US")
ph_raw_types <- c(NA, "UNKNOWN", "MOBILE", "MOBILE", "FIXED_LINE", "FIXED_LINE_OR_MOBILE")

ph_raw_timezone <-
  c(NA,
    "Australia/Sydney",
    "Australia/Sydney",
    "Australia/Sydney",
    "Australia/Sydney",
    "America/New_York")

ph_raw_timezone_strict <-
  c(NA,
    NA,
    "Australia/Sydney",
    "Australia/Sydney",
    "Australia/Sydney",
    "America/New_York")

regions <- get_supported_regions()
# BL and MF have a weird phone relationship, exclude from test
regions <- regions[regions != "MF"]
  
types <- get_types_for_region(regions)
names(types) <- regions

Try the dialr package in your browser

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

dialr documentation built on Oct. 17, 2023, 1:11 a.m.