Skip to content

Commit c78b128

Browse files
committed
Normalize expected dir in test as well
1 parent 5a8d1c0 commit c78b128

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

inst/tinytest/test_profile.R

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,29 @@ expect_equal(tiledb_profile_name(profile4), "profile4")
1919

2020
# Skipping checks for default directory since it is platform dependent.
2121
# Normalize paths on Windows to UNIX-style
22-
profile3_dir <- normalizePath(
23-
path = tiledb_profile_dir(profile3),
24-
winslash = "/",
22+
expected_dir <- normalizePath(
23+
path = dir1,
24+
winslash = "/",
25+
mustWork = FALSE
26+
)
27+
actual_dir_profile3 <- normalizePath(
28+
path = tiledb_profile_dir(profile3),
29+
winslash = "/",
2530
mustWork = FALSE
2631
)
2732
expect_identical(
2833
# trim trailing slashes
29-
current = sub(pattern = "/+$", replacement = "", x = profile3_dir),
30-
target = dir1
34+
current = sub(pattern = "/+$", replacement = "", x = actual_dir_profile3),
35+
target = expected_dir
3136
)
32-
profile4_dir <- normalizePath(
33-
path = tiledb_profile_dir(profile4),
34-
winslash = "/",
37+
actual_dir_profile4 <- normalizePath(
38+
path = tiledb_profile_dir(profile4),
39+
winslash = "/",
3540
mustWork = FALSE
3641
)
3742
expect_identical(
38-
current = sub(pattern = "/+$", replacement = "", x = profile4_dir),
39-
target = dir1
43+
current = sub(pattern = "/+$", replacement = "", x = actual_dir_profile4),
44+
target = expected_dir
4045
)
4146

4247

0 commit comments

Comments
 (0)