forked from r-lib/pkgdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-dont.Rd
82 lines (72 loc) · 1.6 KB
/
test-dont.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
% 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}