Learn R Programming

precommit (version 0.1.3)

run_test_impl: Implement a test run

Description

Implement a test run

Usage

run_test_impl(path_executable, path_candidate, error_msg, cmd_args, copy)

Arguments

path_executable

The path to the executable bash script.

path_candidate

The path to a file that should be modified by the executable.

error_msg

An expected error message. If no error is expected, this can be NULL. In that case, the comparator is applied.

cmd_args

More arguments passed to the file. Pre-commit handles it as described here.

copy

Path with files to copy to the temp directory where the test is run. If the target destination relative to the temp dir where the hook is tested is not identical to the path from where a file should be copied, you can pass a named vector. The name is the target directory relative to the temp directory where the hook is executed (the temp directory will be the working directory at that time) and the value is the path that points to the place where the artifact is currently stored.