R version 4.5.0 beta (2025-03-29 r88074 ucrt) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > evaluate_expr <- future.tests:::evaluate_expr > > if (requireNamespace("ff")) { + message("* evaluate_expr() - 'ff' package ...") + + data <- ff::ff(1:12) + stopifnot(data[4] == 4L) + names <- grep("^ff[[:alpha:]]+$", names(options()), value = TRUE) + oopts <- options()[names] + + res <- evaluate_expr(quote({ requireNamespace("ff") })) + str(res) + stopifnot(is.null(res$error), is.logical(res$value), isTRUE(res$value)) + stopifnot(identical(options()[names], oopts)) + + res <- evaluate_expr(quote({ require("ff") })) + str(res) + stopifnot(is.null(res$error), is.logical(res$value), isTRUE(res$value)) + stopifnot(identical(options()[names], oopts)) + + message("* evaluate_expr() - 'ff' package ... DONE") + } Loading required namespace: ff * evaluate_expr() - 'ff' package ... List of 8 $ expr : language { requireNamespace("ff") } $ local : logi TRUE $ timeout: num Inf $ error : NULL $ value : logi TRUE $ visible: logi FALSE $ output : chr "" $ time : POSIXct[1:2], format: "2025-03-31 07:22:34" "2025-03-31 07:22:34" List of 8 $ expr : language { require("ff") } $ local : logi TRUE $ timeout: num Inf $ error : NULL $ value : logi TRUE $ visible: logi FALSE $ output : chr "" $ time : POSIXct[1:2], format: "2025-03-31 07:22:34" "2025-03-31 07:22:34" * evaluate_expr() - 'ff' package ... DONE > > proc.time() user system elapsed 2.28 0.20 2.43