File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -495,7 +495,15 @@ proc test_multi_file_merge_workflow {} {
495495 }
496496
497497 # Handle each file interactively
498+ set interaction_count 0
499+ set max_interactions 50
498500 while {1} {
501+ incr interaction_count
502+ if {$interaction_count > $max_interactions} {
503+ log_failure "Too many interactions ($max_interactions) - possible infinite loop"
504+ break
505+ }
506+
499507 expect {
500508 -re "NEW.*merge-test1-$timestamp\\.txt.*Action" {
501509 send "d\r"
@@ -549,12 +557,19 @@ proc test_multi_file_merge_workflow {} {
549557 -re "✓ Deleted from repository" {
550558 exp_continue
551559 }
560+ -re "Action \\\[.*\\\]\\\?" {
561+ # Unexpected action prompt - send 'n' to skip
562+ log_info "Unexpected action prompt (interaction $interaction_count) - skipping"
563+ send "n\r"
564+ exp_continue
565+ }
552566 eof {
553567 log_success "Merge-overlay completed all files"
554568 break
555569 }
556570 timeout {
557- log_failure "Timeout during merge-overlay interaction"
571+ log_failure "Timeout during merge-overlay interaction (at interaction $interaction_count)"
572+ log_info "Last buffer content: $expect_out(buffer)"
558573 break
559574 }
560575 }
You can’t perform that action at this time.
0 commit comments