Last chance! 50% off unlimited learning
Sale ends in
Transform an file and check whether it is identical to a reference.
transform_and_check(
in_item,
out_item,
in_name = in_item,
out_name = out_item,
transformer,
dry,
write_tree = NA,
out_tree = "_tree",
...
)
An path to an file to transform.
The path to a file that contains the expected result.
The label of the in_item, defaults to in_item
.
The label of the out_item, defaults to out_item
.
A function to apply to the content of in_item
.
To indicate whether styler should run in dry mode, i.e. refrain
from writing back to files ."on"
and "fail"
both don't write back, the
latter returns an error if the input code is not identical to the result
of styling. "off", the default, writes back if the input and output of
styling are not identical.
Whether or not the tree structure of the test should be
computed and written to a file. Note that this needs R >= 3.2
(see set_arg_write_tree()
). If the argument is set to NA
, the function
determines whether R >= 3.2 is in use and if so, trees will be written.
Name of tree file if written out.
Parameters passed to transformer function.