File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -734,6 +734,20 @@ func TestConfirm(t *testing.T) {
734
734
for _ , o := range e .Call .Output {
735
735
eventContent += o .Content
736
736
}
737
+
738
+ if e .Call .Type == EventTypeCallConfirm {
739
+ // On Windows, ls may not be recognized as a command. The LLM will try to run the dir command. Confirm it.
740
+ if ! strings .Contains (e .Call .Input , "\" dir\" " ) {
741
+ t .Errorf ("unexpected confirm input: %s" , e .Call .Input )
742
+ }
743
+
744
+ if err = g .Confirm (context .Background (), AuthResponse {
745
+ ID : e .Call .ID ,
746
+ Accept : true ,
747
+ }); err != nil {
748
+ t .Errorf ("Error confirming: %v" , err )
749
+ }
750
+ }
737
751
}
738
752
}
739
753
@@ -742,7 +756,7 @@ func TestConfirm(t *testing.T) {
742
756
t .Errorf ("Error reading output: %v" , err )
743
757
}
744
758
745
- if ! strings .Contains (eventContent , "Makefile\n README .md" ) {
759
+ if ! strings .Contains (eventContent , "Makefile" ) || ! strings . Contains ( eventContent , "README .md" ) {
746
760
t .Errorf ("Unexpected event output: %s" , eventContent )
747
761
}
748
762
You can’t perform that action at this time.
0 commit comments