library(future)

message("*** batchtools_template() ...")

## NOTE: Here we use invalid 'workers = FALSE' in order to
## prevent the batchtools future from actually starting,
## because we cannot assume that system has these schedulers.
## NOTE: Some of them will give an earlier error because
## no default template file was found.
res <- try(plan(future.batchtools::batchtools_lsf, workers = FALSE))
stopifnot(inherits(res, "try-error"))

res <- try(plan(future.batchtools::batchtools_openlava, workers = FALSE))
stopifnot(inherits(res, "try-error"))

res <- try(plan(future.batchtools::batchtools_sge, workers = FALSE))
stopifnot(inherits(res, "try-error"))

res <- try(plan(future.batchtools::batchtools_slurm, workers = FALSE))
stopifnot(inherits(res, "try-error"))

res <- try(plan(future.batchtools::batchtools_torque, workers = FALSE))
stopifnot(inherits(res, "try-error"))

message("*** batchtools_template() ... DONE")

