test-dont: Test case: don't

test-dontR Documentation

Test case: don't

Description

Test case: don't

See Also

Other tests: index, test-crayon, test-figures, test-links, test-lists, test-long-lines, test-output-styles, test-params, test-sexpr-title, test-tables, test-verbatim

Examples

# \dontrun{} --------------------------------------------------------
# always shown; never run

x <- 1
## Not run: x <- 2
## Not run: 
  x <- 3
  x <- 4

## End(Not run)
x # should be 1

# \donttest{} -------------------------------------------------------
# only multiline are shown; always run

x <- 1
x <- 2

  x <- 3
  x <- 4

x # should be 4

# \testonly{} -----------------------------------------------------
# never shown, never run

x <- 1


x # should be 1

# \dontshow{} -------------------------------------------------------
# never shown, always run

x <- 1


x # should be 4

# @examplesIf ------------------------------------------------------
# If FALSE, wrapped in if; if TRUE, not seen

x <- 1


x <- 2


x <- 3

x # should be 3

pkgdown documentation built on Sept. 18, 2024, 1:06 a.m.