Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Normalise paths in auto_test

  • Loading branch information...
commit ca738bf083180457de0517e89cf0ee896c5e654b 1 parent 585f27d
@hadley authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 R/auto-test.r
View
4 R/auto-test.r
@@ -33,6 +33,8 @@
#' @keywords debugging
auto_test <- function(code_path, test_path, reporter = "summary", env = NULL) {
reporter <- find_reporter(reporter)
+ code_path <- normalizePath(code_path)
+ test_path <- normalizePath(test_path)
# Start by loading all code and running all tests
if (is.null(env)) {
@@ -47,7 +49,7 @@ auto_test <- function(code_path, test_path, reporter = "summary", env = NULL) {
# Next set up watcher to monitor changes
watcher <- function(added, deleted, modified) {
- changed <- c(added, modified)
+ changed <- normalizePath(c(added, modified))
tests <- changed[starts_with(changed, test_path)]
code <- changed[starts_with(changed, code_path)]
Please sign in to comment.
Something went wrong with that request. Please try again.