Skip to content
Snippets Groups Projects
Commit 77c178db authored by Ruben Heinrich's avatar Ruben Heinrich
Browse files

[bugfix] Test files now generated at right location

parent 490f427b
No related branches found
No related tags found
1 merge request!2Basic import and export functionality
...@@ -42,6 +42,12 @@ download_benchmark <- function(prj_url, path) { ...@@ -42,6 +42,12 @@ download_benchmark <- function(prj_url, path) {
assertthat::assert_that(assertthat::is.string(prj_url)) assertthat::assert_that(assertthat::is.string(prj_url))
assertthat::assert_that(assertthat::is.string(path)) assertthat::assert_that(assertthat::is.string(path))
last_char_index <- length(path)
if(substring(path, last_char_index, last_char_index) != "/"){
path <- paste0(path, "/")
}
prj_dest_file <- paste0(path, basename(prj_url)) prj_dest_file <- paste0(path, basename(prj_url))
file.create(prj_dest_file) file.create(prj_dest_file)
......
...@@ -21,7 +21,7 @@ test_that("download_benchmark works", { ...@@ -21,7 +21,7 @@ test_that("download_benchmark works", {
"flow_no_strain.prj"), "flow_no_strain.prj"),
path = path) path = path)
expect_equal(file.exists(paste0(path, "flow_no_strain.prj")), TRUE) expect_equal(file.exists(paste0(path, "/flow_no_strain.prj")), TRUE)
do.call(file.remove, list(list.files(path, full.names = TRUE))) do.call(file.remove, list(list.files(path, full.names = TRUE)))
}) })
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment