inst/tinytest/test-progress.R

f <- file()

p <- new_progress_bar(100, file = f, symbol = "/")
for (i in 1:100) {
  Sys.sleep(.5/100)
  p(i)
}

dat <- paste(readLines(f), collapse = "\n")
close(f)

expect_true(grepl("////////", dat, fixed = TRUE))

Try the fmcmc package in your browser

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

fmcmc documentation built on Aug. 30, 2023, 1:09 a.m.