Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Enable 3 more Windows tests that use exit commands (#154)

Maximilian Roosd68777d26787
diff --git a/tests/integration_tests/post_start_commands.rs b/tests/integration_tests/post_start_commands.rs
index c8e0ea119..86428f078 100644
--- a/tests/integration_tests/post_start_commands.rs
+++ b/tests/integration_tests/post_start_commands.rs
@@ -104,9 +104,7 @@ approved-commands = [
);
}
-/// Skipped on Windows: snapshot output differs due to shell/path differences.
#[rstest]
-#[cfg_attr(windows, ignore)]
fn test_post_create_failing_command(repo: TestRepo) {
// Create project config with a command that will fail
repo.write_project_config(r#"post-create = "exit 1""#);
diff --git a/tests/integration_tests/remove.rs b/tests/integration_tests/remove.rs
index c63044f32..82e3ddc4e 100644
--- a/tests/integration_tests/remove.rs
+++ b/tests/integration_tests/remove.rs
@@ -826,8 +826,6 @@ approved-commands = ["echo 'hook ran' > {}"]
}
/// Test pre-remove hook failure aborts removal (FailFast strategy).
-/// Skipped on Windows: snapshot output differs due to shell/path differences.
-#[cfg_attr(windows, ignore)]
#[rstest]
fn test_pre_remove_hook_failure_aborts(mut repo: TestRepo) {
// Create project config with failing hook
diff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rs
index 6e0e2e475..019cfcb93 100644
--- a/tests/integration_tests/switch.rs
+++ b/tests/integration_tests/switch.rs
@@ -247,9 +247,9 @@ fn test_switch_execute_creates_file(repo: TestRepo) {
);
}
-/// Skipped on Windows: Uses Unix shell command `exit 1`.
-#[rstest]
+/// Skipped on Windows: error message format differs (`exit status: 1` shown explicitly).
#[cfg_attr(windows, ignore)]
+#[rstest]
fn test_switch_execute_failure(repo: TestRepo) {
snapshot_switch(
"switch_execute_failure",
diff --git a/tests/integration_tests/user_hooks.rs b/tests/integration_tests/user_hooks.rs
index 0c035fc02..1f0df3ff9 100644
--- a/tests/integration_tests/user_hooks.rs
+++ b/tests/integration_tests/user_hooks.rs
@@ -165,9 +165,7 @@ approved-commands = ["echo 'PROJECT_HOOK' > project_marker.txt"]
);
}
-/// Skipped on Windows: snapshot output differs due to shell/path differences.
#[rstest]
-#[cfg_attr(windows, ignore)]
fn test_user_post_create_hook_failure(repo: TestRepo) {
// Write user config with failing hook
repo.write_test_config(