testwhat (version 4.2.2)

test_text: 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