# First, we set up the expected directory structure in a temporary place
tmp = file.path(tempdir(), "test-read_config")
dir.create(tmp)
# We need `force = TRUE` here in order to make the example work in
# non-interactive settings.
setup_directory(root = tmp, include_examples = TRUE, force = TRUE)
# Now we can test `read_config`.
read_config(file.path(tmp, "example_config.txt"),
input_dir = file.path(tmp, "input"))
Run the code above in your browser using DataLab