tests/testthat/test_sqlquotes.R

context("sqlquotes")

test_that("sqlquotes", {
  reg = makeTestRegistry()
  f = function(x) stop("Quoting is 'on'")
  batchMap(reg, f, 1:2)
  submitJobs(reg)
  waitForJobs(reg)
  expect_equal(findErrors(reg), 1:2)

  reg = makeTestRegistry()
  f = function(x) stop('Quoting is "on"')
  batchMap(reg, f, 1:2)
  submitJobs(reg)
  waitForJobs(reg)
  expect_equal(findErrors(reg), 1:2)

  reg = makeTestRegistry()
  f = function(x) stop("Some special chars: \n{}\r\t(),;")
  batchMap(reg, f, 1:2)
  submitJobs(reg)
  waitForJobs(reg)
  expect_equal(findErrors(reg), 1:2)
})

Try the BatchJobs package in your browser

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

BatchJobs documentation built on March 21, 2022, 5:05 p.m.