R version 4.6.0 RC (2026-04-22 r89945 ucrt) -- "Because it was There" Copyright (C) 2026 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. > #! /usr/bin/env Rscript > ## This runs testme test script inst/testme/test-rng.R > ## Don't edit - it was autogenerated by inst/testme/deploy.R > future.batchtools:::testme("rng") Test 'rng' ... chr "none" > library(future) > options(future.debug = FALSE) > message("*** RNG ...") *** RNG ... > plan(future.batchtools::batchtools_local) > message("- run() does not update RNG state") - run() does not update RNG state > f1 <- future(1, lazy = TRUE) > f2 <- future(2, lazy = TRUE) > rng0 <- globalenv()$.Random.seed > f1 <- run(f1) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > f2 <- run(f2) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > v1 <- value(f1) > stopifnot(identical(v1, 1)) > v2 <- value(f2) > stopifnot(identical(v2, 2)) > message("- future() does not update RNG state") - future() does not update RNG state > rng0 <- globalenv()$.Random.seed > f1 <- future(1) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > f2 <- future(2) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > v1 <- value(f1) > stopifnot(identical(v1, 1)) > v2 <- value(f2) > stopifnot(identical(v2, 2)) > message("- resolved() does not update RNG state") - resolved() does not update RNG state > f1 <- future(1) > f2 <- future(2) > rng0 <- globalenv()$.Random.seed > d1 <- resolved(f1) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > d2 <- resolved(f2) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > v1 <- value(f1) > stopifnot(identical(v1, 1)) > v2 <- value(f2) > stopifnot(identical(v2, 2)) > message("- result() does not update RNG state") - result() does not update RNG state > f1 <- future(1) > f2 <- future(2) > rng0 <- globalenv()$.Random.seed > r1 <- result(f1) > stopifnot(identical(r1$value, 1)) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > r2 <- result(f2) > stopifnot(identical(r2$value, 2)) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > v1 <- value(f1) > stopifnot(identical(v1, 1)) > v2 <- value(f2) > stopifnot(identical(v2, 2)) > message("- value() does not update RNG state") - value() does not update RNG state > f1 <- future(1) > f2 <- future(2) > rng0 <- globalenv()$.Random.seed > v1 <- value(f1) > stopifnot(identical(v1, 1)) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > v2 <- value(f2) > stopifnot(identical(v2, 2)) > stopifnot(identical(globalenv()$.Random.seed, rng0)) > message("*** RNG ... DONE") *** RNG ... DONE Failed to undo environment variables: - Expected environment variables: [n=220] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', ..., 'tempdirname' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: Skipping, because path appears not to be an 'R CMD check' folder: 'D:/temp/2026_04_25_00_50_17_18966' Test time: user.self=1s, sys.self=0.2s, elapsed=1e+01s, user.child=NAs, sys.child=NAs Test 'tempdirname' ... success > > proc.time() user system elapsed 1.68 0.45 10.42