% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/test.R
\name{test-dont}
\alias{test-dont}
\title{Test case: don't}
\description{
Test case: don't
}
\examples{
# \dontrun{} --------------------------------------------------------
# always shown; never run

x <- 1
\dontrun{x <- 2}
\dontrun{
  x <- 3
  x <- 4
}
x # should be 1

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

x <- 1
\donttest{x <- 2}
\donttest{
  x <- 3
  x <- 4
}
x # should be 4

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

x <- 1
\testonly{x <- 2}
\testonly{
  x <- 3
  x <- 4
}
x # should be 1

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

x <- 1
\dontshow{x <- 2}
\dontshow{
  x <- 3
  x <- 4
}
x # should be 4

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

x <- 1

\dontshow{if (FALSE) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
x <- 2
\dontshow{\}) # examplesIf}
\dontshow{if (TRUE) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
x <- 3
\dontshow{\}) # examplesIf}
x # should be 3
}
\seealso{
Other tests: 
\code{\link{index}},
\code{\link{test-crayon}},
\code{\link{test-figures}},
\code{\link{test-links}},
\code{\link{test-lists}},
\code{\link{test-long-lines}},
\code{\link{test-output-styles}},
\code{\link{test-params}},
\code{\link{test-sexpr-title}},
\code{\link{test-tables}},
\code{\link{test-verbatim}}
}
\concept{tests}
\keyword{internal}
