test: Fix Unix-only assumptions in ide-build tests; run all tests in CI

The Gradle and Maven tests expected the Unix wrapper and command names, and
the canonical-root test uses Unix absolute paths. CI now reports every
failing test instead of stopping at the first few.

Claude-Session: https://claude.ai/code/session_01B65qLEKnkeYTGdbwhLpjCu
This commit is contained in:
l0ng-ai
2026-10-22 22:42:11 +08:00
parent 909225858c
commit fecdb974ff
4 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ jobs:
- if: runner.os == 'Linux'
run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo nextest run --workspace
- run: cargo nextest run --workspace --no-fail-fast
- name: Bindings are up to date
if: runner.os == 'Linux'
run: pnpm gen:bindings && git diff --exit-code src/bindings.ts
+2
View File
@@ -735,6 +735,8 @@ mod tests {
assert_eq!(identifier_len("x é_1 c", 2), 3);
}
// Uses Unix absolute paths for the canonical root.
#[cfg(unix)]
#[test]
fn resolves_paths_against_cwd_and_canonical_root() {
let tmp = tempfile::tempdir().unwrap();
+3 -2
View File
@@ -406,7 +406,8 @@ Pattern: clean<TaskName>: Cleans the output files of a task.
std::fs::write(root.join("settings.gradle.kts"), "rootProject.name = \"demo\"\ninclude(\"app\")").unwrap();
std::fs::create_dir_all(root.join("app")).unwrap();
std::fs::write(root.join("app/build.gradle.kts"), "plugins { application }").unwrap();
std::fs::write(root.join("gradlew"), "#!/bin/sh").unwrap();
let wrapper = if cfg!(windows) { "gradlew.bat" } else { "gradlew" };
std::fs::write(root.join(wrapper), "#!/bin/sh").unwrap();
let m = load(root).unwrap();
assert_eq!(m.dir, "");
let ps: Vec<(&str, &str, &str, Option<&str>)> = m
@@ -418,7 +419,7 @@ Pattern: clean<TaskName>: Cleans the output files of a task.
assert!(m.projects[0].tasks.iter().any(|t| t.name == "wrapper"));
assert!(!m.projects[0].tasks.iter().any(|t| t.name == "build"));
assert!(m.projects[1].tasks.iter().any(|t| t.name == "run" && t.group == "application"));
assert!(m.command.ends_with("gradlew"));
assert!(m.command.ends_with(wrapper));
assert_eq!(build_files(root, &m).len(), 2);
assert_eq!(m.java_version, None);
assert_eq!(
+1 -1
View File
@@ -1163,7 +1163,7 @@ mod tests {
let profiles: Vec<(&str, bool)> = model.profiles.iter().map(|p| (p.id.as_str(), p.active_by_default)).collect();
assert_eq!(profiles, [("dev", true), ("extra", false)]);
assert_eq!(parent.profiles, ["dev", "extra"]);
assert!(model.projects.iter().all(|p| p.command == "mvn"));
assert!(model.projects.iter().all(|p| p.command == if cfg!(windows) { "mvn.cmd" } else { "mvn" }));
}
#[test]