/usr/share/doc/r-cran-future/tests/futureOf.R is in r-cran-future 1.7.0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | source("incl/start.R")
library("listenv")
message("*** futureOf() ...")
a %<-% { 1 } %lazy% TRUE
f1 <- futureOf("a")
print(f1)
f2 <- futureOf(a)
print(f2)
stopifnot(identical(f2, f1))
fs <- futureOf()
print(fs)
## Non-existing object
res <- tryCatch(futureOf("non-exiting-object", mustExist = TRUE), error = identity)
stopifnot(inherits(res, "error"))
message("*** futureOf() ... DONE")
source("incl/end.R")
|