tests/testthat/test-parse.R

test_that("can control processing order with @order", {
  out <- roc_proc_text(rd_roclet(), "
    #' @rdname bar
    #' @details 2
    #' @order 2
    foo <- function() {}

    #' @rdname bar
    #' @details 1
    #' @order 1
    bar <- function() {}

    #' @title Title
    #' @name bar
    NULL
  ")[[1]]

  expect_equal(out$get_value("details"), c("1", "2"))
})

Try the roxygen2 package in your browser

Any scripts or data that you put into this service are public.

roxygen2 documentation built on Dec. 9, 2022, 1:09 a.m.