Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
test: Add zsh to hook-related integration tests for full parity
Maximilian Roos2ca1c776b996
diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex 4130ee5c3..10230caad 100644--- a/tests/integration_tests/shell_wrapper.rs+++ b/tests/integration_tests/shell_wrapper.rs@@ -462,6 +462,7 @@ mod tests {/// Test switch --create with post-create-command (blocking) and post-start-command (background)#[rstest]#[case("bash")]+ #[case("zsh")]#[case("fish")]fn test_wrapper_switch_with_hooks(#[case] shell: &str) {let repo = TestRepo::new();@@ -526,6 +527,7 @@ command = "echo 'Watching for file changes'"/// Test merge with successful pre-merge-command validation#[rstest]#[case("bash")]+ #[case("zsh")]#[case("fish")]fn test_wrapper_merge_with_pre_merge_success(#[case] shell: &str) {let mut repo = TestRepo::new();@@ -610,6 +612,7 @@ command = "echo '✓ All 47 tests passed in 2.3s'"/// Test merge with failing pre-merge-command that aborts the merge#[rstest]#[case("bash")]+ #[case("zsh")]#[case("fish")]fn test_wrapper_merge_with_pre_merge_failure(#[case] shell: &str) {let mut repo = TestRepo::new();diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snapnew file mode 100644index 000000000..29eac739a--- /dev/null+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap@@ -0,0 +1,18 @@+---+source: tests/integration_tests/shell_wrapper.rs+expression: output.normalized().as_ref()+---+zsh:365: command not found: compdef+✓ Code formatting check passed+✗ Test suite failed: 3 tests failing+❌ [31mPre-merge command failed: [1m[31mtest[0m[0m++Command failed with exit code: exit status: 1++💡 [2mUse --no-hooks to skip pre-merge commands[0m+🔄 [36mRunning pre-merge command [1m[36mformat[0m:[0m+[40m [0m echo '✓ Code formatting check passed'+++🔄 [36mRunning pre-merge command [1m[36mtest[0m:[0m+[40m [0m echo '✗ Test suite failed: 3 tests failing' && exit 1diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snapnew file mode 100644index 000000000..3474951f1--- /dev/null+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap@@ -0,0 +1,32 @@+---+source: tests/integration_tests/shell_wrapper.rs+expression: output.normalized().as_ref()+---+zsh:365: command not found: compdef+✓ Code formatting check passed+✓ Linting passed - no warnings+✓ All 47 tests passed in 2.3s+🔄 [36mRunning pre-merge command [1m[36mformat[0m:[0m+[40m [0m echo '✓ Code formatting check passed'+++🔄 [36mRunning pre-merge command [1m[36mlint[0m:[0m+[40m [0m echo '✓ Linting passed - no warnings'+++🔄 [36mRunning pre-merge command [1m[36mtest[0m:[0m+[40m [0m echo '✓ All 47 tests passed in 2.3s'+++🔄 [36mRebasing onto [1m[36mmain[0m...[0m+🔄 [36mMerging 1 commit to [1m[36mmain[0m @ d067f01[0m++* [33md067f01[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature++ feature.txt | 1 [32m+[m+ 1 file changed, 1 insertion(+)++✅ [32mMerged to [1m[32mmain[0m (1 commit, 1 file, [32m+1[0m) [0m+🔄 [36mCleaning up worktree...[0m++✅ [32mReturned to primary at [TMPDIR]/test-repo[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snapnew file mode 100644index 000000000..408cbd06e--- /dev/null+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap@@ -0,0 +1,22 @@+---+source: tests/integration_tests/shell_wrapper.rs+expression: output.normalized().as_ref()+---+zsh:365: command not found: compdef+Installing dependencies...+Building project...+🔄 [36mExecuting (post-create):[0m+[40m [0m echo 'Installing dependencies...'+++🔄 [36mExecuting (post-create):[0m+[40m [0m echo 'Building project...'+++🔄 [36mStarting (background):[0m+[40m [0m echo 'Starting dev server on port 3000'++🔄 [36mStarting (background):[0m+[40m [0m echo 'Watching for file changes'++✅ [32mCreated new worktree for [1m[32mfeature-hooks[0m at [TMPDIR]/test-repo.feature-hooks[0m