Simplify a test filename to a context name.

context_name(filename)

Arguments

filename

A character string giving the filename of a test file. Standard prefix (test-) and suffix (*.R) are stripped.

Examples

context_name("test-my-function.R")
#> [1] "my-function"
context_name("test-myFunction.R")
#> [1] "myFunction"