Skip to content

Commit 700a10d

Browse files
committed
probably more reliable test
1 parent 5c5043f commit 700a10d

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

tests/test-agent-dev.expect

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)