tests/testthat/test-format.R

library(SQLFormatteR)

test_that("simple SELECT", {
  query_formatted <- SQLFormatteR::sql_format("SELECT    A FROM B")
  expect_equal(query_formatted, "SELECT\n  A\nFROM\n  B")
})

Try the SQLFormatteR package in your browser

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

SQLFormatteR documentation built on April 13, 2025, 9:08 a.m.