display_name() returns the path of the source file of each trace of a
coverage object, relative to the package root, e.g. to keep the coverage of
some files with x[display_name(x) %in% files].
Arguments
- x
A coverage object.
Examples
cov <- code_coverage("f <- function(x) x + 1", "f(1)")
display_name(cov)
#> source.R19a150e0fd62:1:6:1:22:6:22:1:1
#> "/tmp/RtmpSgGT3a/source.R19a150e0fd62"
