tests/testthat/test_002_utils.R

testthat::context("utils")

testthat::test_that("quote_ids() function works fine.", {
  testthat::expect_equal(quote_ids("a"), "a")
  testthat::expect_equal(quote_ids("ab"), "ab")
  testthat::expect_equal(quote_ids("a1"), "a1")
  testthat::expect_equal(quote_ids("0"), '"0"')
  testthat::expect_equal(quote_ids("0a"), '"0a"')
  testthat::expect_equal(quote_ids("a_b"), 'a_b')
  testthat::expect_equal(quote_ids("a b"), '"a b"')
  testthat::expect_equal(quote_ids(c("a", "a b")), c("a", '"a b"'))
})

Try the sqlq package in your browser

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

sqlq documentation built on Sept. 16, 2025, 9:10 a.m.