дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
test(maven): compare JDTLS exclusions with forward-slash paths
Exclusions are written with forward slashes so they work as Java globs on Windows; the tests compared them with native paths and failed there.
Цей коміт міститься в:
1 джерело
6c1eba9d82
коміт
08956b615e
2 files changed
+6
-4
No files matched your search
@@ -993,8 +993,10 @@ mod maven_linkage_tests {
|
||||
ide_sdk::apply::configure_maven_import(&mut server, tmp.path(), &excluded_poms);
|
||||
let options = serde_json::to_value(server.initialization_options).unwrap();
|
||||
let exclusions = options.pointer("/settings/java/import/exclusions").unwrap().as_array().unwrap();
|
||||
assert!(exclusions.contains(&serde_json::json!(tmp.path().join("a").to_string_lossy())));
|
||||
assert!(exclusions.contains(&serde_json::json!(tmp.path().join("a/child").to_string_lossy())));
|
||||
assert!(exclusions.contains(&serde_json::json!(tmp.path().join("a").to_string_lossy().replace('\\', "/"))));
|
||||
assert!(
|
||||
exclusions.contains(&serde_json::json!(tmp.path().join("a/child").to_string_lossy().replace('\\', "/")))
|
||||
);
|
||||
let roots = super::linked_roots(tmp.path(), &settings, &detected);
|
||||
assert!(roots.roots.iter().any(|r| r.path == "b/src/main/java"));
|
||||
assert!(!roots.roots.iter().any(|r| r.path.starts_with("a/")));
|
||||
|
||||
@@ -735,8 +735,8 @@ mod maven_linkage_tests {
|
||||
let options = serde_json::to_value(cfg.initialization_options).unwrap();
|
||||
let exclusions = options.pointer("/settings/java/import/exclusions").unwrap().as_array().unwrap();
|
||||
assert!(exclusions.contains(&json!("**/custom")));
|
||||
assert!(exclusions.contains(&json!(tmp.path().join("a").to_string_lossy())));
|
||||
assert!(exclusions.contains(&json!(tmp.path().join("a/child").to_string_lossy())));
|
||||
assert!(exclusions.contains(&json!(tmp.path().join("a").to_string_lossy().replace('\\', "/"))));
|
||||
assert!(exclusions.contains(&json!(tmp.path().join("a/child").to_string_lossy().replace('\\', "/"))));
|
||||
assert!(cfg.args[1].starts_with("/cache/jdtls-maven-"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Заблокувати користувача