#
# This test file has been generated by kwb.test::create_test_files()
#
test_that("matchingTimeFormat() works", {
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = 1)
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = 1:2)
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = "a")
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = c("a", "b"))
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = TRUE)
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = FALSE)
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = as.POSIXct("2018-06-03 23:50:00"))
kwb.datetime:::matchingTimeFormat(timestamp = "a", timeFormats = list(key = c("a", "b"), value = 1:2))
expect_error(
kwb.datetime:::matchingTimeFormat(timestamp = 1, timeFormats = 1)
# Exactly one character timestamp expected!
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.