Run transformations on all *-in.R files in a test directory and compare them with their *-out.R counterpart.
test_collection( test, sub_test = NULL, write_back = TRUE, write_tree = NA, transformer, ... )
The test to run. It corresponds to a folder name in tests/testthat.
A regex pattern to further reduce the amount of test files
to be tested in the test.
Whether the results of the transformation should be written to the output file.
Whether or not the tree structure of the test should be
computed and written to a file. Note that this needs R >= 3.2
A function to apply to the content of
Parameters passed to transformer function.
Each file name that matches
sub_test and ends with
"-in.R" is considered as an input to test. Its counterpart,
the reference to compare it against is the *-out.R file. It is constructed
by taking the substring of the *-in.R file before the
last dash and adding -out.R. In contrast to older versions of this
function, every *-out.R file has just one in file.