unitizer icon indicating copy to clipboard operation
unitizer copied to clipboard

Fix CRAN only Windows Errors

Open brodieG opened this issue 7 years ago • 0 comments

# Failed test #1: for non-existent paths, `pretty_path` is expected to return
# the input.  Internally, it calls `normalizePath(..., mustWork=FALSE)`, which
# is likely returning the full path to the working directory in CRAN, and just
# the (non-existent) file name on every other windows platform I could test.
# This variation seems within what one might expect based on the documentation
# for `normalizePath`.  I tried to make my function be consistent under either
# scenario I couldn't test it properly and failed.

# tests/testthat/testthat.misc.R@334

stopifnot(
  unitizer:::pretty_path('xadfasdfxcfasdfasd') == 'xadfasdfxcfasdfasd'
)

# Failed test #2: Basically the same issue where we use `normalizePath` on a
# non-existent path and instead of getting an error we get a path (although
# I am not certain of this since with the 13 line limit from CRAN I could not
# see the actual error output).

# tests/testthat/testthat.get.R@368

stopifnot(
  unitizer:::as.store_id_chr(file.path(getwd(), "hello")) == "hello"
)

brodieG avatar Apr 11 '17 00:04 brodieG