Skip to content

Commit

Permalink
Merge pull request #9 from rossellhayes/fix/check_always-fake-example
Browse files Browse the repository at this point in the history
Hardcode output in examples section for `check_always()`
  • Loading branch information
Paulj1989 authored Feb 20, 2024
2 parents 8380795 + 8aab3b5 commit ac8e6fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
9 changes: 8 additions & 1 deletion R/check_always.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ nice_callback <- function(expr, value, ok, visible) {
#'
#' @export
#'
#' @examples
#' @section Examples:
#' ```r
#' check_always()
#' #> Now checking whether all output is nice
#' 23 * 3
#' #> [1] 69
#' #> Nice!
#'
#' uncheck_always()
#' #> No longer checking whether all output is nice
#' 23 * 3
#' #> [1] 69
#' ```
check_always <- function(verbose = TRUE) {
if ("nice_callback" %in% getTaskCallbackNames()) {
if (isTRUE(verbose)) message("Already checking whether all output is nice")
Expand Down
13 changes: 11 additions & 2 deletions man/check_always.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac8e6fc

Please sign in to comment.