File: test-sql.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 (10 lines) | stat: -rw-r--r-- 300 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
test_that("can concatenate sql vector without supplying connection", {
  expect_equal(c(sql("x")), sql("x"))
  expect_equal(c(sql("x"), "x"), sql("x", "'x'"))
  expect_equal(c(ident("x")), sql("`x`"))
})

test_that("can format sql", {
  expect_snapshot(sql())
  expect_snapshot(sql(a = "x", "y"))
})