
R version 4.0.5 Patched (2021-05-28 r80517) -- "Shake and Throw"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)

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.

> source(file.path("_helper", "init.R"))
> 
> # - "random seed" --------------------------------------------------------------
> 
> dir <- file.path(TMP.DIR, "randdir")
> dir.create(dir)
> file <- file.path(dir, "randtest.R")
> cat("sample(1:100)\n", file = file)
> set.seed(1)
> coi(unitize(file, auto.accept = "new"))
Warning in history_capt(history, interactive.mode) :
  Unable to capture history in non-interactive mode.
| Auto-accepting changes...
| unitizer updated.

> # changing seed should have no effect on result
> set.seed(23)
> coi(res <- unitize(file))
Warning in history_capt(history, interactive.mode) :
  Unable to capture history in non-interactive mode.
| 1/1 test passed; nothing to review.

> # expect_equal(as.character(res$status), "Passed")
> as.character(res$status)
[1] "Passed"
> 
> 
> proc.time()
   user  system elapsed 
  1.456   0.128   1.612 
