Calls the tool with call_tool() and expects an isError result: the error
the model reads, not a crash of the server.
Usage
expect_tool_error(tool, args = list(), regexp = NULL, ...)Arguments
- tool
Name of the tool.
- args
Named list of arguments.
- regexp
Regular expression the error message must match, or
NULL.- ...
Passed to
call_tool().
Examples
if (FALSE) { # \dontrun{
# In the tests of a package made by create_mordew():
expect_tool_error(
"longest_runs",
list(
n = -1
),
"at least"
)
} # }