test_text: Test inline text and formatting (Markdown)

View source: R/rstudio-test-text.R

test_textR Documentation

Test inline text and formatting (Markdown)

Description

Test inline text and its formatting for R Markdown exercises. This test can only be called inside a test_rmd_group() call!

Usage

test_text(text, format = "any", freq = 1, not_called_msg = NULL,
  incorrect_msg = NULL)

Arguments

text

Text to match (can be a regular expression!)

format

the format of the text that the text should be in ("any", "italics", "bold", "code", "inline_code", "brackets", "parentheses", "list"). If none of the above, the format string is appended to text in front and in the back and used as a regexp.

freq

How often the text should appear with this formatting

not_called_msg

feedback message if the text was not there

incorrect_msg

feedback message if the text was not properly formatted


datacamp/testwhat documentation built on June 26, 2022, 9:07 a.m.