styler (version 1.1.1)

transform_and_check: Transform a file an check the result

Description

Transform an file and check whether it is identical to a reference.

Usage

transform_and_check(in_item, out_item, in_name = in_item,
  out_name = out_item, transformer, write_back, write_tree = NA,
  out_tree = "_tree", ...)

Arguments

in_item

An path to an file to transform.

out_item

The path to a file that contains the expected result.

in_name

The label of the in_item, defaults to in_item.

out_name

The label of the out_item, defaults to out_item.

transformer

A function to apply to the content of in_item.

write_back

Whether the results of the transformation should be written to the output file.

write_tree

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.

out_tree

Name of tree file if written out.

...

Parameters passed to transformer function.