Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/testthat/test_system.R
Original file line number Diff line number Diff line change
Expand Up @@ -1282,9 +1282,13 @@ test_that("resolveOracleClientLocation only reports an ORACLE_HOME for the lib s
file.create(file.path(zipLayout, "libclntsh.dylib.23.1"))

# ROracle only ever looks at $ORACLE_HOME/lib, so home is the parent of the lib directory.
# resolveOracleClientLocation derives home with dirname(), which on Windows rewrites every
# separator to a forward slash, while tempfile() hands back backslashes -- so compare with the
# separators neutralized rather than against the raw homeLayout string. (no-op on Mac/Linux)
forwardSlashes <- function(p) gsub("\\\\", "/", p)
resolved <- exploratory:::resolveOracleClientLocation(homeLayout)
expect_equal(resolved$libDir, file.path(homeLayout, "lib"))
expect_equal(resolved$home, homeLayout)
expect_equal(forwardSlashes(resolved$home), forwardSlashes(homeLayout))

# The zip layout cannot be expressed as an ORACLE_HOME, so home stays empty and the
# caller falls back to loading the library directly.
Expand Down