File: test-ident.R

package info (click to toggle)
r-cran-dbplyr 2.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,376 kB
  • sloc: sh: 13; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 315 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
test_that("zero length inputs return correct clases", {
  expect_s3_class(ident(), "ident")
})

test_that("ident quotes", {
  con <- simulate_dbi()
  x1 <- ident("x")

  expect_equal(escape(x1, con = con), sql('`x`'))
  expect_equal(as.sql(x1), x1)
})

test_that("can format ident", {
  expect_snapshot(ident())
})