mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
test(gradle): build expected launcher paths from path segments
The expected paths joined "<dir>/bin" as one segment, which mixes separators on Windows.
This commit is contained in:
@@ -291,7 +291,10 @@ mod gradle_settings_tests {
|
||||
let model = load(root, &root.join("cache"), &settings).gradle.unwrap();
|
||||
assert_eq!(
|
||||
model.command,
|
||||
root.join("gradle-install/bin").join(if cfg!(windows) { "gradle.bat" } else { "gradle" }).to_string_lossy()
|
||||
root.join("gradle-install")
|
||||
.join("bin")
|
||||
.join(if cfg!(windows) { "gradle.bat" } else { "gradle" })
|
||||
.to_string_lossy()
|
||||
);
|
||||
assert_eq!(model.env["JAVA_HOME"], root.join("jdk21").to_string_lossy());
|
||||
assert_eq!(model.env["GRADLE_USER_HOME"], root.join("user-home").to_string_lossy());
|
||||
|
||||
@@ -724,7 +724,7 @@ fn gradle_settings_precedence() {
|
||||
for local in [false, true] {
|
||||
settings.languages.java.gradle.distribution =
|
||||
if local { GradleDistribution::Local } else { GradleDistribution::Wrapper };
|
||||
let expected = if local { root.join("local-gradle/bin").join(plain) } else { plain.into() };
|
||||
let expected = if local { root.join("local-gradle").join("bin").join(plain) } else { plain.into() };
|
||||
for explicit_java in [false, true] {
|
||||
for is_test in [false, true] {
|
||||
let mut configs =
|
||||
|
||||
Reference in New Issue
Block a user