unitizer (version 1.4.6)

testthat_transcribe_file: Transcribes a testtaht File Into unitizer Format

Description

Internal use only, required so we can ensure the parse succeeded because of possible parse-deparse issues independent of running unitize, since unitize cannot be run inside a tryCatch block.

Usage

testthat_transcribe_file(file.name, target.dir = file.path(dirname(file.name),
  "..", "unitizer"), keep.testthat.call = TRUE, prompt = "always",
  interactive.mode, ...)

Arguments

file.name

a path to the testthat test file to convert

target.dir

the directory to create the unitizer test file and test store in; for testthat_translate_file only: if NULL will return as a character vector what the contents of the translated file would have been instead of writing the file

keep.testthat.call

whether to preserve the testthat call that was converted, as a comment

prompt

character(1L):

  • "always" to always prompt before writing new files

  • "overwrite" only prompt if existing file is about to be overwritten

  • "never" never prompt

interactive.mode

logical(1L) primarily for testing purposes, allows us to force prompting in non-interactive mode; note that unitize and unitize_dir are always called in non-interactive mode by these functions, this parameter only controls prompts generated directly by these functions.

...

params to pass on to testthat_translate_name