-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a9de3b
commit 55904cf
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
test_that("toy_dirs creates syncdr.env", { | ||
|
||
toy_dirs() | ||
|
||
# Check if the environment exists | ||
expect_true(exists("syncdr.env", | ||
envir = .GlobalEnv)) | ||
|
||
# Check paths exist | ||
expect_true(exists("left", | ||
envir = syncdr.env)) | ||
expect_true(exists("right", | ||
envir = syncdr.env)) | ||
|
||
left <- syncdr.env$left | ||
right <- syncdr.env$right | ||
|
||
# Check if the directories exist | ||
expect_true(fs::dir_exists(left)) | ||
expect_true(fs::dir_exists(right)) | ||
|
||
# Check dirs are not empty | ||
expect_true(length(dir_ls(left, | ||
recurse = TRUE)) > 0) | ||
expect_true(length(dir_ls(right, | ||
recurse = TRUE)) > 0) | ||
}) |