Running 't-browser.R' [2s]
  Comparing 't-browser.Rout' to 't-browser.Rout.save' ... OK
  Running 't-capture.R' [1s]
  Comparing 't-capture.Rout' to 't-capture.Rout.save' ... OK
  Running 't-change.R' [1s]
  Comparing 't-change.Rout' to 't-change.Rout.save' ... OK
  Running 't-demo.R' [9s]
  Running 't-error.R' [1s]
  Comparing 't-error.Rout' to 't-error.Rout.save' ... OK
  Running 't-exec.R' [1s]
  Comparing 't-exec.Rout' to 't-exec.Rout.save' ... OK
  Running 't-get.R' [2s]
  Comparing 't-get.Rout' to 't-get.Rout.save' ... OK
  Running 't-global.R' [1s]
  Comparing 't-global.Rout' to 't-global.Rout.save' ... OK
  Running 't-handledruns.R' [2s]
  Comparing 't-handledruns.Rout' to 't-handledruns.Rout.save' ... OK
  Running 't-ischecks.R' [1s]
  Comparing 't-ischecks.Rout' to 't-ischecks.Rout.save' ... OK
  Running 't-item.R' [2s]
  Comparing 't-item.Rout' to 't-item.Rout.save' ... OK
  Running 't-list.R' [1s]
  Comparing 't-list.Rout' to 't-list.Rout.save' ... OK
  Running 't-misc.R' [1s]
  Comparing 't-misc.Rout' to 't-misc.Rout.save' ... OK
  Running 't-nav.R' [2s]
  Running 't-parse.R' [1s]
  Comparing 't-parse.Rout' to 't-parse.Rout.save' ... OK
  Running 't-prompt.R' [1s]
  Comparing 't-prompt.Rout' to 't-prompt.Rout.save' ... OK
  Running 't-random.R' [1s]
  Comparing 't-random.Rout' to 't-random.Rout.save' ... OK
  Running 't-rename.R' [1s]
  Comparing 't-rename.Rout' to 't-rename.Rout.save' ... OK
  Running 't-repairenvs.R' [1s]
  Comparing 't-repairenvs.Rout' to 't-repairenvs.Rout.save' ... OK
  Running 't-search.R' [8s]
  Comparing 't-search.Rout' to 't-search.Rout.save' ... OK
  Running 't-section.R' [1s]
  Comparing 't-section.Rout' to 't-section.Rout.save' ... OK
  Running 't-shim.R' [7s]
  Comparing 't-shim.Rout' to 't-shim.Rout.save' ... OK
  Running 't-state.R' [1s]
  Comparing 't-state.Rout' to 't-state.Rout.save' ... OK
  Running 't-text.R' [1s]
  Comparing 't-text.Rout' to 't-text.Rout.save' ... OK
  Running 't-translate.R' [3s]
  Running 't-upgrade.R' [3s]
  Running 't-utz1.R' [9s]
  Running 't-utz2.R' [9s]
  Running 'zz-check.R' [0s]
Running the tests in 'tests/t-demo.R' failed.
Complete output:
  > source(file.path("aammrtf", "mock.R"))
  > source(file.path("_helper", "init.R"))
  > source(file.path("_helper", "pkgs.R"))
  Install Packages
  Setup Demos
  > 
  > # Mostly makes sure the demo steps work, but since it is a convenient way of
  > # generating a unitizer with actual errors and so forth, we use it to test a few
  > # other things as well in the context of those unitizers
  > 
  > # - "in_pkg" -------------------------------------------------------------------
  > 
  > base.dir <- file.path(FLM, "tests", "extra")
  > in.pkg.file <- file.path(base.dir, "inpkg.R")
  > 
  > unitizer:::read_line_set_vals(c("Q"))
  > txt1 <- unitizer:::capture_output(unitize(in.pkg.file, interactive.mode = TRUE))
  > # `sub` needed due to inconsistencies in R 3.4 and 3.3 for top level error
  > # messages
  > txt1$message <- sub("^Error.*:", "", txt1$message)
  > txt1
  - Output -----------------------------------------------------------------------
  
  
  +------------------------------------------------------------------------------+
  | unitizer for: extra/inpkg.R                                                  |
  +------------------------------------------------------------------------------+
  
               Pass Fail  New
   <untitled>     -    -    1
  ...........................
                  -    -    1
  
  - New --------------------------------------------------------------------------
  
  | The following test is new. Add test to store ([Y]es, [N]o, [P]rev, [B]rowse, 
  | [R]erun, [Q]uit, [H]elp)?
  
  # should fail normally, but return TRUE if run in fastlm
  
  > library(utzflm, lib.loc = getOption("unitizer.tmp.lib.loc"))
  > hidden_fun()
  
  unitizer> Q
  
  | unitizer unchanged.
  
  - Message ----------------------------------------------------------------------
  
   could not find function "hidden_fun"
  | No changes recorded.
  > unitizer:::read_line_set_vals(c("Q"))
  > unitize(in.pkg.file, state = in_pkg(), interactive.mode = TRUE)
  
  +------------------------------------------------------------------------------+
  | unitizer for: extra/inpkg.R                                                  |
  +------------------------------------------------------------------------------+
  
               Pass Fail  New
   <untitled>     -    -    1
  ...........................
                  -    -    1
  
  - New --------------------------------------------------------------------------
  
  | The following test is new. Add test to store ([Y]es, [N]o, [P]rev, [B]rowse, 
  | [R]erun, [Q]uit, [H]elp)?
  
  # should fail normally, but return TRUE if run in fastlm
  
  > library(utzflm, lib.loc = getOption("unitizer.tmp.lib.loc"))
Running the tests in 'tests/t-nav.R' failed.
Complete output:
  > source(file.path("_helper", "init.R"))
  > nav <- file.path("_helper", "unitizers", "nav.R")
  > 
  > # Simple navigation tests that don't require complex unitizers
  > 
  > # - "Re-run bookmark" -----=----------------------------------------------------
  > 
  > # Relates to #278.  Tests both Review and Browse
  > 
  > unitizer:::read_line_set_vals(
  +   c("R", "Y", "B", "7", "R", "Y", "B", "9", "R", "Y", "Q")
  + )
  > unitize(nav, interactive.mode=TRUE)
  
  +------------------------------------------------------------------------------+
  | unitizer for: _helper/unitizers/nav.R                                        |
  +------------------------------------------------------------------------------+
  
      Pass Fail  New
   A     -    -    2
   B     -    -    2
  ..................
         -    -    4
  
  = A ============================================================================
  
  - New --------------------------------------------------------------------------
  
  | The 2 tests in this section are new. Add tests to store ([Y]es, [N]o, [P]rev, 
  | [B]rowse, [R]erun, [Q]uit, [H]elp)?
  
  > a <- 42
  > a + 1
  [1] 43
  
  unitizer> R
  
  | Toggling re-run mode ON for this unitizer
  
  = Finalize Unitizer ============================================================
  
  | You have 4 unreviewed tests; press `B` to browse tests, `U` to go to first 
  | unreviewed test.
  
  | You made no changes to the unitizer so there is no need to update it.  While 
  | unnecessary, you can force an update by typing O at the prompt.
  
  | Re-run unitizer ([Y]es, [P]rev, [B]rowse, [U]nreviewed, [R]erun, f[O]rce)?
  
  unitizer> Y
  
  | unitizer unchanged.
  
  +------------------------------------------------------------------------------+
  | unitizer for: _helper/unitizers/nav.R                                        |
  +------------------------------------------------------------------------------+
  
      Pass Fail  New
   A     -    -    2
   B     -    -    2
  ..................
         -    -    4
  
  = A ============================================================================
  
  - New --------------------------------------------------------------------------
  
  | The 2 tests in this section are new. Add tests to store ([Y]es, [N]o, [P]rev, 
  | [B]rowse, [R]erun, [Q]uit, [H]elp)?
  
  | Jumping to test #3 because that was the test under review when test re-run was
  | requested.
  
  > a <- 42
Running the tests in 'tests/t-translate.R' failed.
Complete output:
  > source(file.path("_helper", "init.R"))
  > source(file.path("aammrtf", "ref.R")); make_ref_obj_funs("refobjs")
  > 
  > test.file.dir <- file.path("_helper", "ref-objs", "translate")
  > test.file <- file.path(test.file.dir, "testthat", "test-translate2.R")
  > test.file.min <- file.path(test.file.dir, "testthat2", "test-translate-min.R")
  > target.dir.base <- file.path(TMP.DIR, basename(tempfile()))
  > target.dir <- file.path(target.dir.base, "helper", "translate", "unitizer")
  > 
  > # - "Prompt to create dir" -----------------------------------------------------
  > 
  > try(
  +   testthat_translate_file(
  +     test.file, target.dir, prompt = "always", interactive.mode = FALSE
  + ) )
  Error in testthat_transcribe_file(file.name, target.dir, keep.testthat.call,  : 
    Unable to proceed without creating target directory
  > # translations have to be outside of `testthat`; second translation should fail
  > # except we allow manual input
  > 
  > # - "translate a file" ---------------------------------------------------------
  > 
  > unitizer:::capture_output({
  +     unitizer:::read_line_set_vals(c("Y"))
  +     res1 <- testthat_translate_file(test.file, target.dir, prompt = "always",
  +         interactive.mode = TRUE)
  +     res1.txt <- readLines(res1)
  +     unitizer:::read_line_set_vals(c("Y"))
  +     res2 <- testthat_translate_file(test.file, target.dir, prompt = "overwrite",
  +         interactive.mode = TRUE)
  +     res2.txt <- readLines(res2)
  +     unitizer:::read_line_set_vals(NULL)
  + })
  > dummy <- new("unitizerDummy")
  > 
  > all.equal(res1.txt, rds("translate_res1"))
  [1] TRUE
  > all.equal(res1.txt, res2.txt)
  [1] TRUE
  > 
  > # Can't do this twice in a row without prompting in non-interactive mode
  > # note test above does work because we use interactive mode to accept prompt
  > 
  > any(
  +   grepl(
  +     "already exists",
  +     capture.output(
  +       try(
  +         testthat_translate_file(
  +           test.file, target.dir, prompt = "always", interactive.mode = FALSE
  +       ) ),
  +       type='message'
  + ) ) )
  [1] TRUE
  > untz <- get_unitizer(file.path(target.dir, "translate2.unitizer"))
  > all.equal(untz@items.ref.calls.deparse, rds("translate_res2"))
  [1] TRUE
  > 
  > lapply(unitizer:::as.list(untz@items.ref), function(x) x@data@value[[1L]])
  [[1]]
  <object not recorded>
  
  [[2]]
   [1]  1  2  3  4  5  6  7  8  9 10
  
  [[3]]
  NULL
  
  [[4]]
  NULL
  
  [[5]]
  NULL
  
  [[6]]
  NULL
  
  [[7]]
  [1] "yoyo"
  
  [[8]]
  NULL
  
  > unlink(target.dir, recursive = TRUE)
  > 
  > target.dir.base <- file.path(TMP.DIR, basename(tempfile()))
  > target.dir <- file.path(target.dir.base, "_helper", "translate", "unitizer")
  > 
  > test.dir <- file.path("_helper", "ref-objs", "translate", "testthat")
  > 
  > # - "translate a dir" ----------------------------------------------------------
  > 
  > unitizer:::capture_output(res2 <- testthat_translate_dir(test.dir, target.dir))
Running the tests in 'tests/t-upgrade.R' failed.
Complete output:
  > source(file.path("_helper", "init.R"))
  > blat_vers <- function(x) sub("'\\d+(?:\\.\\d+)*'", "'<version>'", x)
  > 
  > # - "Upgrade works" ------------------------------------------------------------
  > 
  > # this is also now tested as part of load
  > unitizer <-
  +   get_unitizer(file.path("_helper", "unitizers", "trivial.unitizer.0.4.2"))
  > try(validObject(unitizer, complete = TRUE))
  Error in validObject(object[[x]], complete = TRUE) : 
    invalid class "unitizerItem" object: 1: slots in class definition but not in object: "call.dep", "section.id", "section.name", "glob.indices", "state"
  invalid class "unitizerItem" object: 2: In slot "data" of class "unitizerItemData": invalid object for slot "value" in class "unitizerItemData": got class "logical", should be or extend class "list"
  > as.character(unitizer@version)
  [1] "0.4.2"
  > unitizer.up <- unitizer:::upgrade_internal(unitizer) # warning
  Warning in addSlot(object, "cons", NULL) :
    Slot `cons` does not exist in current version of `unitizer` so not added to object.
  Warning in addSlot(object, "jump.to.test", 0L) :
    Slot `jump.to.test` does not exist in current version of `unitizer` so not added to object.
  > validObject(unitizer.up)
  [1] TRUE
  > identical(unitizer.up@version, as.character(packageVersion("unitizer")))
  [1] TRUE
  > 
  > # - Upgrade Warnings in Unitize ------------------------------------------------
  > 
  > tdir <- tempfile()
  > dir.create(tdir)
  > dir.create(file.path(tdir, "trivial.unitizer"))
  > file.copy(file.path("_helper", "unitizers", "trivial.R"), tdir)
  [1] TRUE
  > file.copy(
  +   file.path("_helper", "unitizers", "trivial.unitizer.0.4.2", "data.rds"),
  +   file.path(tdir, "trivial.unitizer")
  + )
  [1] TRUE
  > odir <- setwd(tdir)
  > unitizer:::read_line_set_vals('N')
  > out <- unitizer:::capture_output(
  +   try(unitize(file.path(tdir, "trivial.R"), interactive.mode=TRUE))
  + )
  > out[] <- lapply(out, blat_vers)
  > out
  - Output -----------------------------------------------------------------------
  
  
  | 
  | The following unitizer will be upgraded to version '<version>':
  | 
  | - trivial.unitizer (at '<version>')
  
  unitizer> N
  
  - Message ----------------------------------------------------------------------
  
  Warning in check_call_stack() :
    It appears you are running unitizer inside an error handling function such as 
  `withCallingHanlders`, `tryCatch`, or `withRestarts`.  This is strongly dis-
  couraged as it may cause unpredictable behavior from unitizer in the event tests
  produce conditions / errors.  We strongly recommend you re-run your tests 
  outside of such handling functions.
  Warning in addSlot(object, "cons", NULL) :
    Slot `cons` does not exist in current version of `unitizer` so not added to object.
  Warning in addSlot(object, "jump.to.test", 0L) :
    Slot `jump.to.test` does not exist in current version of `unitizer` so not added to object.
  Warning in load_unitizers(store.ids[active], test.files[active], par.frame = util.frame,  :
    Upgraded test file does not match original test file ('NA' vs 'trivial.R').
  | unitizer upgrades are IRREVERSIBLE and not backwards compatible. 
  | Proceed?
  
  Error in unitize_core(test.file.inf, list(store.id.inf), state = state,  : 
    Cannot proceed without upgrading unitizers.
  > 
  > unitizer:::read_line_set_vals(c('Y','Q'))
  > out <- unitizer:::capture_output(
  +   unitize(file.path(tdir, "trivial.R"), interactive.mode=TRUE)
  + )
  > out[] <- lapply(out, blat_vers)
  > out
  - Output -----------------------------------------------------------------------
  
  
  | 
  | The following unitizer will be upgraded to version '<version>':
  | 
  | - trivial.unitizer (at '<version>')
  
  unitizer> Y
  
  +------------------------------------------------------------------------------+
  | unitizer for: trivial.R                                                      |
  +------------------------------------------------------------------------------+
  
               Pass Fail  New
   <untitled>     1    -    3
  ...........................
                  1    -    3
  
  - New --------------------------------------------------------------------------
  
  | The 3 tests in this section are new. Add tests to store ([Y]es, [N]o, [P]rev, 
  | [B]rowse, [R]erun, [Q]uit, [H]elp)?
  
  > x <- 1 + 1
  > x + 2
  [1] 4
  
  unitizer> Q
  
  | unitizer unchanged.
  
  - Message ----------------------------------------------------------------------
  
  Warning in addSlot(object, "cons", NULL) :
    Slot `cons` does not exist in current version of `unitizer` so not added to object.
  Warning in addSlot(object, "jump.to.test", 0L) :
    Slot `jump.to.test` does not exist in current version of `unitizer` so not added to object.
  Warning in load_unitizers(store.ids[active], test.files[active], par.frame = util.frame,  :
    Upgraded test file does not match original test file ('NA' vs 'trivial.R').
  | unitizer upgrades are IRREVERSIBLE and not backwards compatible. 
  | Proceed?
  
  | No changes recorded.
  > unitizer:::read_line_set_vals(NULL)
  > setwd(odir)
  > unlink(tdir, recursive=TRUE)
  > 
  > # - Upgrade Multiple Unitizers Unitize -----------------------------------------
  > 
  > tdir <- tempfile()
  > dir.create(tdir)
  > dir.create(file.path(tdir, "trivial1.unitizer"))
  > dir.create(file.path(tdir, "trivial2.unitizer"))
  > file.copy(
  +   file.path("_helper", "unitizers", "trivial.R"),
  +   file.path(tdir, c("trivial1.R", "trivial2.R"))
  + )
  [1] TRUE TRUE
  > file.copy(
  +   file.path("_helper", "unitizers", "trivial.unitizer.0.4.2", "data.rds"),
  +   file.path(tdir, "trivial1.unitizer")
  + )
  [1] TRUE
  > file.copy(
  +   file.path("_helper", "unitizers", "trivial.unitizer.0.4.2", "data.rds"),
  +   file.path(tdir, "trivial2.unitizer")
  + )
  [1] TRUE
  > odir <- setwd(tdir)
  > unitizer:::read_line_set_vals(c('Y','Q'))
  > out <- unitizer:::capture_output(
  +   unitize_dir(tdir, interactive.mode=TRUE)
  + )
  > out[] <- lapply(out, blat_vers)
  > out
  - Output -----------------------------------------------------------------------
  
  
  | 
  | The following unitizers will be upgraded to version '<version>':
  | 
  | - trivial1.unitizer (at '<version>')
  | - trivial2.unitizer (at '<version>')
  
  unitizer> Y
  
  | Summary of files in common directory '.':
  | 
  |                 Pass Fail  New
  | *1. trivial1.R     1    -    3
  | *2. trivial2.R     1    -    3
  | ..............................
  |                    2    -    6
  | Legend:
  | * `unitizer` requires review
  
  | Type number of unitizer to review, 'A' to review all that require review
  
  unitizer> Q
  
  - Message ----------------------------------------------------------------------
  
  Warning in addSlot(object, "cons", NULL) :
    Slot `cons` does not exist in current version of `unitizer` so not added to object.
  Warning in addSlot(object, "jump.to.test", 0L) :
    Slot `jump.to.test` does not exist in current version of `unitizer` so not added to object.
  Warning in addSlot(object, "cons", NULL) :
    Slot `cons` does not exist in current version of `unitizer` so not added to object.
  Warning in addSlot(object, "jump.to.test", 0L) :
    Slot `jump.to.test` does not exist in current version of `unitizer` so not added to object.
  Warning in load_unitizers(store.ids[active], test.files[active], par.frame = util.frame,  :
    Upgraded test file does not match original test file ('NA' vs 'trivial1.R').
  Warning in load_unitizers(store.ids[active], test.files[active], par.frame = util.frame,  :
    Upgraded test file does not match original test file ('NA' vs 'trivial2.R').
  | unitizer upgrades are IRREVERSIBLE and not backwards compatible. 
  | Proceed?
  
  > unitizer:::read_line_set_vals(NULL)
  > setwd(odir)
  > unlink(tdir, recursive=TRUE)
  > 
  > # - "Rename" -------------------------------------------------------------------
  > 
  > setClass("untzUpgrTest", slots = c(a = "character"))
  > x <- new("untzUpgrTest", a = letters)
  > validObject(x)
  [1] TRUE
  > setClass("untzUpgrTest", slots = c(b = "character"))
  > try(validObject(x))
  Error in validObject(x) : 
    invalid class "untzUpgrTest" object: slots in class definition but not in object: "b"
  > try(capture.output(unitizer:::renameSlot(x, "c", "b"), type = "message"))
  Error in unitizer:::renameSlot(x, "c", "b") : 
    Old slot `c` doesn't exist in object
  > x.rename <- unitizer:::renameSlot(x, "a", "b")
  > validObject(x.rename)
  [1] TRUE
  > 
  > # - "Later but valid version" --------------------------------------------------
  > 
  > test.file <- file.path(TMP.DIR, "tests.R")
  > cat("1 + 1", file = test.file)
  > unitizer:::capture_output(unitize(test.file, auto.accept = "new"))
Running the tests in 'tests/t-utz1.R' failed.
Complete output:
  > # - "No Attach Test" -----------------------------------------------------------
  > 
  > f <- paste0(tempfile(), ".R")
  > writeLines("1 + 1", f)
  > try(unitizer::unitize(f))
  
  Error in unitize_core(test.file.inf, list(store.id.inf), state = state,  : 
    `unitizer` package must be attached to the search path, e.g. with `library(unitizer)`
  > unlink(f)
  > 
  > # - "Usual Setup" --------------------------------------------------------------
  > 
  > source(file.path("_helper", "init.R"))
  > source(file.path("aammrtf", "ref.R")); make_ref_obj_funs("refobjs")
  > source(file.path("_helper", "pkgs.R"))
  Install Packages
  Setup Demos
  > 
  > # - "custom history file" ------------------------------------------------------
  > 
  > # Random history file
  > unitizer:::read_line_set_vals(c("1 + 1", "Y", "Y", "Y", "Y", "N"))
  > hist.file <- tempfile()
  > invisible(
  +   unitizer:::capture_output(
  +     unitize(FLM.TEST.FILE, interactive.mode = TRUE, history = hist.file)
  + ) )
  > hist.dat <- readLines(hist.file)
  > unlink(hist.file)
  > 
  > # History only works in interactive mode
  > if (interactive()) {
  +   identical(hist.dat, c("## <unitizer> (original history will be restored on exit)",
  +     "library(utzflm, lib.loc = getOption(\"unitizer.tmp.lib.loc\"))",
  +     "dat <- data.frame(x = 1:100, y = (1:100)^2)", "res <- fastlm(dat$x, dat$y)",
  +     "res", "1 + 1", "get_slope(res)", "get_rsq(res)", "fastlm(1:100, 1:10)"))
  + } else {
  +   identical(hist.dat, character())
  + }
  [1] TRUE
  > # - "bad history" --------------------------------------------------------------
  > 
  > bad.hist <- try(unitize(FLM.TEST.FILE, history = list()), silent = TRUE)
  
  > inherits(bad.hist, "try-error")
  [1] TRUE
  > conditionMessage(attr(bad.hist, "condition"))
  [1] "Argument `history` must be the name of a file that can be opened in \"at\" mode, or \"\", or NULL"
  > 
  > # - "bad seed" -----------------------------------------------------------------
  > 
  > # gsub needed b/c of inconsistent error calls in 3.3.2 and 3.4
  > old.opt <- options(unitizer.seed = "bad.seed")
  > txtopt1 <- unitizer:::capture_output(try(unitize(FLM.TEST.FILE)))
  > options(unitizer.seed = list("bad.seed"))
  > txtopt2 <- unitizer:::capture_output(try(unitize(FLM.TEST.FILE)))
  > # set.seed gained an argument c.a. R3.6 that caused error mismatch
  > txtopt2$message[grepl("\\(function \\(seed", txtopt2$message,
  +     ignore.case = TRUE)] <- ""
  > options(old.opt)
  > 
  > 
  > unitizer:::clean_eval_exp(txtopt1)
  - Output -----------------------------------------------------------------------
  
  
  - Message ----------------------------------------------------------------------
  
  Error in do.call(set.seed, seed.dat) : second argument must be a list
  Error in as.state(state, test.files) : 
    Internal Error: failed processing raw state object, contact maintainer. (Unable to set random seed; make sure `getOption('unitizer.seed')` is a list of possible arguments to `set.seed`, or set `seed` slot to be less than 2L.)
  Error in unitize_core(test.file.inf, list(store.id.inf), state = state,  : 
    Argument `state` could not be evaluated.
  > # supplied seed not valid int
  > # unexpectedly exited; not clear why all stderr is not being captured by
  > # capture_output...
  > txtopt2
  - Output -----------------------------------------------------------------------
  
  
  - Message ----------------------------------------------------------------------
  
  
    NAs introduced by coercion
  
    supplied seed is not a valid integer
  Error in as.state(state, test.files) : 
    Internal Error: failed processing raw state object, contact maintainer. (Unable to set random seed; make sure `getOption('unitizer.seed')` is a list of possible arguments to `set.seed`, or set `seed` slot to be less than 2L.)
  Error in unitize_core(test.file.inf, list(store.id.inf), state = state,  : 
    Argument `state` could not be evaluated.
  > 
  > # - "create dir" ---------------------------------------------------------------
  > 
  > # Unitizers in different directories that don't exist; also test using a
  > # function to generate those directories
  > get_store_id <- function(x) {
  +     file <- basename(x)
  +     dir <- dirname(dirname(x))
  +     file.path(dir, "unitizer2", sub("(.*)\\.R", "\\1.unitizer",
  +         file))
  + }
  > unitizer:::read_line_set_vals(c("N"))
  > txt1 <- unitizer:::capture_output(
  +   untz1 <- try(unitize_dir(FLM.TEST.DIR, get_store_id, interactive.mode = TRUE))
  + )
  > unitizer:::read_line_set_vals(c("Y", "Q"))
  > txt2 <- unitizer:::capture_output(untz2 <- unitize_dir(FLM.TEST.DIR,
  +     get_store_id, interactive.mode = TRUE))
  > 
  > inherits(untz1, "try-error")
  [1] TRUE
  > inherits(untz2, "unitizer_results")
  [1] TRUE
  > 
  > # Some of the text must be ablated
  > rem_txt <- function(x) {
  +     crd <- grep("Create directory\\?", x)
  +     if (!length(crd))
  +         stop("Logic Error: this must be a create directory test")
  +     x[-(2L:(crd[[1L]] - 1L))]
  + }
  > txt1$output <- rem_txt(txt1$output)
  > txt2$output <- rem_txt(txt2$output)
  > 
  > # must create the following directory
  > # cannot proceed w/o creating directories
  > 
  > txt1
  - Output -----------------------------------------------------------------------
  
  
  | Create directory?
  
  unitizer> N
  
  - Message ----------------------------------------------------------------------
  
  Warning in check_call_stack() :
    It appears you are running unitizer inside an error handling function such as 
  `withCallingHanlders`, `tryCatch`, or `withRestarts`.  This is strongly dis-
  couraged as it may cause unpredictable behavior from unitizer in the event tests
  produce conditions / errors.  We strongly recommend you re-run your tests 
  outside of such handling functions.
  Error in unitize_core(test.files = test.files, store.ids = store.ids,  : 
    Cannot proceed without creating directories.
  > txt2
  - Output -----------------------------------------------------------------------
  
  
  | Create directory?
  
  unitizer> Y
  
  | Summary of files in common directory 'unitizer':
  | 
  |                        Pass Fail  New
  | *1.         fastlm1.R     -    -    4
  | *2.         fastlm2.R     -    -    1
  | *3. unitizer.fastlm.R     -    -    3
  | .....................................
  |                           -    -    8
  | Legend:
  | * `unitizer` requires review
  
  | Type number of unitizer to review, 'A' to review all that require review
  
  unitizer> Q
  
  - Message ----------------------------------------------------------------------
  
  
  > 
  > # - print / dir ----------------------------------------------------------------
  > 
  > # quit from all at once
  > unitizer:::read_line_set_vals(c("A", "QQ", "Q"))
  > unitize_dir(FLM.TEST.DIR, interactive.mode = TRUE)
  
  | Summary of files in common directory 'unitizer':
  | 
  |                        Pass Fail  New
  | *1.         fastlm1.R     -    -    4
  | *2.         fastlm2.R     -    -    1
  | *3. unitizer.fastlm.R     -    -    3
  | .....................................
  |                           -    -    8
  | Legend:
  | * `unitizer` requires review
  
  | Type number of unitizer to review, 'A' to review all that require review
  
  unitizer> A
  
  +------------------------------------------------------------------------------+
  | unitizer for: unitizer/fastlm1.R                                             |
  +------------------------------------------------------------------------------+
  
               Pass Fail  New
   <untitled>     -    -    4
  ...........................
                  -    -    4
  
  - New --------------------------------------------------------------------------
  
  | The 4 tests in this section are new. Add tests to store ([Y]es, [N]o, [P]rev, 
  | [B]rowse, [R]erun, [QQ]uit All, [Q]uit, [H]elp)?
  
  # Assignments and calls to `library` are not considered tests by
  # `unitizer` so you will not need to review them
  
  > library(utzflm, lib.loc = getOption("unitizer.tmp.lib.loc"))
Running the tests in 'tests/t-utz2.R' failed.
Complete output:
  > # Overflow tests from testthat.unitize.R
  > 
  > source(file.path("_helper", "init.R"))
  > source(file.path("_helper", "pkgs.R"))
  Install Packages
  Setup Demos
  > 
  > library(unitizer)
  > 
  > # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  > # - "unreviewed variations" ----------------------------------------------------
  > # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  > 
  > # Test unreviewed
  > # Accept one and go to unreviewed
  > # Accept one more and browse and go to unreviewed
  > # Accept two remaining and confirm no unreviewed
  > # No unreviewed tests
  > unitizer:::read_line_set_vals(
  +   c("Y", "Q", "U", "Y", "B", "U", "Y", "Y", "U", "B", "U", "Q")
  + )
  > out <- unitizer:::capture_output(unitize(FLM.TEST.FILE, interactive.mode = TRUE))
  > unitizer:::clean_eval_exp(out)
  - Output -----------------------------------------------------------------------
  
  
  +------------------------------------------------------------------------------+
  | unitizer for: unitizer/fastlm1.R                                             |
  +------------------------------------------------------------------------------+
  
               Pass Fail  New
   <untitled>     -    -    4
  ...........................
                  -    -    4
  
  - New --------------------------------------------------------------------------
  
  | The 4 tests in this section are new. Add tests to store ([Y]es, [N]o, [P]rev, 
  | [B]rowse, [R]erun, [Q]uit, [H]elp)?
  
  # Assignments and calls to `library` are not considered tests by
  # `unitizer` so you will not need to review them
  
  > library(utzflm, lib.loc = getOption("unitizer.tmp.lib.loc"))
  > dat <- data.frame(x = 1:100, y = (1:100)^2)
  > res <- fastlm(dat$x, dat$y)
  
  # The `unitizer>` prompt is like the standard R prompt. You may
  # enter expressions such as `lm(y ~ x, dat)$coefficients`, or
  # `str(res)`.
  #
  # Once you are done reviewing, you need to tell `unitizer` you
  # accept the test by typing 'Y' at the prompt.  Enter 'H' for help.
  
  > res
  intercept     slope       rsq 
  -1717.000   101.000     0.939 
  attr(,"class")
  [1] "fastlm"
  
  unitizer> Y
  
  # There are three more tests to review; accept them with 'Y'
  
  > get_slope(res)
  [1] 101
  
  unitizer> Q
  
  = Finalize Unitizer ============================================================
  
  | You have 3 unreviewed tests; press `B` to browse tests, `U` to go to first 
  | unreviewed test.
  
  | Update unitizer ([Y]es, [N]o, [P]rev, [B]rowse, [U]nreviewed, [R]erun)?
  
  unitizer> U
  
  # There are three more tests to review; accept them with 'Y'
  
  > get_slope(res)
  [1] 101
  
  unitizer> Y
  
  > get_rsq(res)
  [1] 0.939
  
  unitizer> B
  
    *1. library(utzflm, lib.loc = getOption("unitizer.tmp.lib.loc")) .     -:-
    *2. dat <- data.frame(x = 1:100, y = (1:100)^2)   .  .  .  .  .  .     -:-
    *3. res <- fastlm(dat$x, dat$y) .  .  .  .  .  .  .  .  .  .  .  .     -:-
     4. res .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:Y
     5. get_slope(res)  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:Y
     6. get_rsq(res) .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:-
     7. fastlm(1:100, 1:10)   .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:-
  
  | What test do you wish to review (input a test number, [U]nreviewed)?
  
  unitizer> U
  
  - New --------------------------------------------------------------------------
  
  | The 4 tests in this section are new. Add tests to store ([Y]es, [N]o, [P]rev, 
  | [B]rowse, [R]erun, [Q]uit, [H]elp)?
  
  > get_rsq(res)
  [1] 0.939
  
  unitizer> Y
  
  # This last test is expected to cause an error; press 'Y' to
  # accept it so future checks can confirm the same error persists
  
  > fastlm(1:100, 1:10)
  
  unitizer> Y
  
  = Finalize Unitizer ============================================================
  
  | Update unitizer ([Y]es, [N]o, [P]rev, [B]rowse, [R]erun)?
  
  unitizer> U
  
  | Update unitizer ([Y]es, [N]o, [P]rev, [B]rowse, [R]erun, [Q]uit, [H]elp)?
  
  unitizer> B
  
    *1. library(utzflm, lib.loc = getOption("unitizer.tmp.lib.loc")) .     -:-
    *2. dat <- data.frame(x = 1:100, y = (1:100)^2)   .  .  .  .  .  .     -:-
    *3. res <- fastlm(dat$x, dat$y) .  .  .  .  .  .  .  .  .  .  .  .     -:-
     4. res .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:Y
     5. get_slope(res)  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:Y
     6. get_rsq(res) .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:Y
     7. fastlm(1:100, 1:10)   .  .  .  .  .  .  .  .  .  .  .  .  .  .   New:Y
  
  | What test do you wish to review (input a test number, [U]nreviewed)?
  
  unitizer> U
  
  = Finalize Unitizer ============================================================
  
  | Update unitizer ([Y]es, [N]o, [P]rev, [B]rowse, [R]erun)?
  
  unitizer> Q
  
  | unitizer unchanged.
  
  - Message ----------------------------------------------------------------------
  
  | You will IRREVERSIBLY modify 'unitizer/fastlm1.unitizer' by:
  | - Adding 1 out of 4 new tests
  
  Error in fastlm(1:100, 1:10) : 
    Arguments `x` and `y` must be the same length.
  | You will IRREVERSIBLY modify 'unitizer/fastlm1.unitizer' by:
  | - Adding 4 out of 4 new tests
  
  Error in : object 'U' not found
  | No unreviewed tests.
  
  | You will IRREVERSIBLY modify 'unitizer/fastlm1.unitizer' by:
  | - Adding 4 out of 4 new tests
  
  | Changes discarded.
  > 
  > # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  > # - "Re-eval" ------------------------------------------------------------------
  > # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  > 
  > # Test re-eval
  > # Re-eval and jump back to file 1
  > # Quit from file 1 and back to main menu
  > # Accept one test in file 2 and quit
  > # Go to file 3, accept one, and Re-eval all
  > 
  > unitizer:::read_line_set_vals(
  +   c("1", "Y", "R", "Y", "Q", "2", "Y", "Y", "3", "Y", "RR", "Y", "Q", "Q")
  + )
  > untz1 <- unitize_dir(FLM.TEST.DIR, interactive.mode = TRUE)
  
  | Summary of files in common directory 'unitizer':
  | 
  |                        Pass Fail  New
  | *1.         fastlm1.R     -    -    4
  | *2.         fastlm2.R     -    -    1
  | *3. unitizer.fastlm.R     -    -    3
  | .....................................
  |                           -    -    8
  | Legend:
  | * `unitizer` requires review
  
  | Type number of unitizer to review, 'A' to review all that require review
  
  unitizer> 1
  +------------------------------------------------------------------------------+
  | unitizer for: unitizer/fastlm1.R                                             |
  +------------------------------------------------------------------------------+
  
               Pass Fail  New
   <untitled>     -    -    4
  ...........................
                  -    -    4
  
  - New --------------------------------------------------------------------------
  
  | The 4 tests in this section are new. Add tests to store ([Y]es, [N]o, [P]rev, 
  | [B]rowse, [R]erun, [Q]uit, [H]elp)?
  
  # Assignments and calls to `library` are not considered tests by
  # `unitizer` so you will not need to review them
  
  > library(utzflm, lib.loc = getOption("unitizer.tmp.lib.loc"))
Running the tests in 'tests/zz-check.R' failed.
Complete output:
  > source('aammrtf/check.R')
  43: > lorem1 <- "Today, with Kiernan on the stand offering confirmation, Howard walked the jury through the enormous amount of data pulled from Ulbricht's computer. Defense lawyers haven't had a chance yet to respond to this evidence<e2><80><94>that will likely come tomorrow. The mountain they have to climb looks higher than ever, though. Last week, Ulbricht's lawyer outlined a defense in which Ulbricht walked away from the marketplace he created and was \"lured back.\" But what will explain the dozens of folders of data on this laptop, with data from the upper echelons of Silk Road management<e2><80><94>mixed with the most intimate details of Ulbricht's personal life?"
  
  
  
  
  
  
  
  
  
  
  
  
  
  Error: .Rout files missing (failed?):
  't-demo.Rout', 't-nav.Rout', 't-translate.Rout', 't-upgrade.Rout', 't-utz1.Rout', 't-utz2.Rout'
  In addition: Warning message:
  In eval(ei, envir) : Some outputs contain non-ASCII:
  't-text.Rout'
  Execution halted