The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.
TypeScript code-editorcross-platformdapdatabase-clientdebuggerdesktop-appdeveloper-toolsgithttp-clientideintellijlsprusttauriterminal
test(sdk): match the too-old-JDK path as test_jdk writes it (#840)
arookieofce3f8932e2160
diff --git a/crates/ide-sdk/src/java.rs b/crates/ide-sdk/src/java.rsindex 23835c3d9..56d81ecf7 100644--- a/crates/ide-sdk/src/java.rs+++ b/crates/ide-sdk/src/java.rs@@ -1047,10 +1047,14 @@ mod tests {assert_eq!(cfg.env["JAVA_HOME"], fixtures.path().join("opt/own-jdk").to_string_lossy());// Too old for this jdtls: the user's choice is not overridden, it is explained.- let cfg = run(Some(&jdk(21, "/jdk21")), 25);+ let old = jdk(21, "/jdk21");+ let cfg = run(Some(&old), 25);assert!(!cfg.env.contains_key("JAVA_HOME"));let err = cfg.launch_error.unwrap();- assert!(err.contains("/jdk21") && err.contains("JDK 25 or newer"), "{err}");+ // The message embeds jdk.home as written to disk, so match that instead of the+ // "/jdk21" literal: its separators are platform-native since test_jdk+ // materializes real directories.+ assert!(err.contains(old.home.to_string_lossy().as_ref()) && err.contains("JDK 25 or newer"), "{err}");assert!(err.contains(SERVER_JDK_SETTING), "both messages point at the same setting: {err}");}