line_where: Identify an individual line in a sequence of commands

Description Usage Arguments Value Examples

View source: R/line_where.R

Description

The tests are written in terms of pronouns

Grab the lines after a specified line (which is included)

Usage

1
2
3
line_where(ex, ..., message = "")

lines_after(ex, ..., message = "")

Arguments

ex

expressions as made by for_checkr()

...

tests specifying the kind of line we want

message

A character string to be included as the message in the result. This can have moustaches written in terms of F, Z, V, or EX

Value

A checkr test result. By default, if the line is found, the result is an "OK", setting the stage for further testing. If no matching line is found, the result is a fail.

Examples

1
2
ex <- for_checkr(quote({x <- 2; y <- x^3; z <- y + x}))
line_where(ex, F == "^")

dtkaplan/checkr2 documentation built on May 17, 2019, 4:01 p.m.