@@ -175,19 +175,20 @@ public function testAskWithAutocomplete()
175
175
// Acm<NEWLINE>
176
176
// Ac<BACKSPACE><BACKSPACE>s<TAB>Test<NEWLINE>
177
177
// <NEWLINE>
178
- // <UP ARROW><UP ARROW><NEWLINE>
179
- // <UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><TAB>Test<NEWLINE>
178
+ // <UP ARROW><UP ARROW><UP ARROW>< NEWLINE>
179
+ // <UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW>< TAB>Test<NEWLINE>
180
180
// <DOWN ARROW><NEWLINE>
181
181
// S<BACKSPACE><BACKSPACE><DOWN ARROW><DOWN ARROW><NEWLINE>
182
182
// F00<BACKSPACE><BACKSPACE>oo<TAB><NEWLINE>
183
- $ inputStream = $ this ->getInputStream ("Acm \nAc \177\177s \tTest \n\n\033[A \033[A \n\033[A \033[A \033[A \033[A \033[A \tTest \n\033[B \nS \177\177\033[B \033[B \nF00 \177\177oo \t\n" );
183
+ // F⭐<TAB><BACKSPACE><BACKSPACE>⭐<TAB><NEWLINE>
184
+ $ inputStream = $ this ->getInputStream ("Acm \nAc \177\177s \tTest \n\n\033[A \033[A \033[A \n\033[A \033[A \033[A \033[A \033[A \033[A \033[A \tTest \n\033[B \nS \177\177\033[B \033[B \nF00 \177\177oo \t\nF⭐ \t\177\177⭐ \t\n" );
184
185
185
186
$ dialog = new QuestionHelper ();
186
187
$ helperSet = new HelperSet ([new FormatterHelper ()]);
187
188
$ dialog ->setHelperSet ($ helperSet );
188
189
189
190
$ question = new Question ('Please select a bundle ' , 'FrameworkBundle ' );
190
- $ question ->setAutocompleterValues (['AcmeDemoBundle ' , 'AsseticBundle ' , 'SecurityBundle ' , 'FooBundle ' ]);
191
+ $ question ->setAutocompleterValues (['AcmeDemoBundle ' , 'AsseticBundle ' , 'SecurityBundle ' , 'FooBundle ' , ' F⭐Y ' ]);
191
192
192
193
$ this ->assertEquals ('AcmeDemoBundle ' , $ dialog ->ask ($ this ->createStreamableInputInterfaceMock ($ inputStream ), $ this ->createOutputInterface (), $ question ));
193
194
$ this ->assertEquals ('AsseticBundleTest ' , $ dialog ->ask ($ this ->createStreamableInputInterfaceMock ($ inputStream ), $ this ->createOutputInterface (), $ question ));
@@ -197,6 +198,7 @@ public function testAskWithAutocomplete()
197
198
$ this ->assertEquals ('AcmeDemoBundle ' , $ dialog ->ask ($ this ->createStreamableInputInterfaceMock ($ inputStream ), $ this ->createOutputInterface (), $ question ));
198
199
$ this ->assertEquals ('AsseticBundle ' , $ dialog ->ask ($ this ->createStreamableInputInterfaceMock ($ inputStream ), $ this ->createOutputInterface (), $ question ));
199
200
$ this ->assertEquals ('FooBundle ' , $ dialog ->ask ($ this ->createStreamableInputInterfaceMock ($ inputStream ), $ this ->createOutputInterface (), $ question ));
201
+ $ this ->assertEquals ('F⭐Y ' , $ dialog ->ask ($ this ->createStreamableInputInterfaceMock ($ inputStream ), $ this ->createOutputInterface (), $ question ));
200
202
}
201
203
202
204
public function testAskWithAutocompleteWithNonSequentialKeys ()
@@ -680,20 +682,21 @@ public function testLegacyAskWithAutocomplete()
680
682
// Acm<NEWLINE>
681
683
// Ac<BACKSPACE><BACKSPACE>s<TAB>Test<NEWLINE>
682
684
// <NEWLINE>
683
- // <UP ARROW><UP ARROW><NEWLINE>
684
- // <UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><TAB>Test<NEWLINE>
685
+ // <UP ARROW><UP ARROW><UP ARROW>< NEWLINE>
686
+ // <UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW>< TAB>Test<NEWLINE>
685
687
// <DOWN ARROW><NEWLINE>
686
688
// S<BACKSPACE><BACKSPACE><DOWN ARROW><DOWN ARROW><NEWLINE>
687
689
// F00<BACKSPACE><BACKSPACE>oo<TAB><NEWLINE>
688
- $ inputStream = $ this ->getInputStream ("Acm \nAc \177\177s \tTest \n\n\033[A \033[A \n\033[A \033[A \033[A \033[A \033[A \tTest \n\033[B \nS \177\177\033[B \033[B \nF00 \177\177oo \t\n" );
690
+ // F⭐<TAB><BACKSPACE><BACKSPACE>⭐<TAB><NEWLINE>
691
+ $ inputStream = $ this ->getInputStream ("Acm \nAc \177\177s \tTest \n\n\033[A \033[A \033[A \n\033[A \033[A \033[A \033[A \033[A \033[A \033[A \tTest \n\033[B \nS \177\177\033[B \033[B \nF00 \177\177oo \t\nF⭐ \t⭐ \t\n" );
689
692
690
693
$ dialog = new QuestionHelper ();
691
694
$ dialog ->setInputStream ($ inputStream );
692
695
$ helperSet = new HelperSet ([new FormatterHelper ()]);
693
696
$ dialog ->setHelperSet ($ helperSet );
694
697
695
698
$ question = new Question ('Please select a bundle ' , 'FrameworkBundle ' );
696
- $ question ->setAutocompleterValues (['AcmeDemoBundle ' , 'AsseticBundle ' , 'SecurityBundle ' , 'FooBundle ' ]);
699
+ $ question ->setAutocompleterValues (['AcmeDemoBundle ' , 'AsseticBundle ' , 'SecurityBundle ' , 'FooBundle ' , ' F⭐Y ' ]);
697
700
698
701
$ this ->assertEquals ('AcmeDemoBundle ' , $ dialog ->ask ($ this ->createInputInterfaceMock (), $ this ->createOutputInterface (), $ question ));
699
702
$ this ->assertEquals ('AsseticBundleTest ' , $ dialog ->ask ($ this ->createInputInterfaceMock (), $ this ->createOutputInterface (), $ question ));
@@ -703,6 +706,7 @@ public function testLegacyAskWithAutocomplete()
703
706
$ this ->assertEquals ('AcmeDemoBundle ' , $ dialog ->ask ($ this ->createInputInterfaceMock (), $ this ->createOutputInterface (), $ question ));
704
707
$ this ->assertEquals ('AsseticBundle ' , $ dialog ->ask ($ this ->createInputInterfaceMock (), $ this ->createOutputInterface (), $ question ));
705
708
$ this ->assertEquals ('FooBundle ' , $ dialog ->ask ($ this ->createInputInterfaceMock (), $ this ->createOutputInterface (), $ question ));
709
+ $ this ->assertEquals ('F⭐Y ' , $ dialog ->ask ($ this ->createStreamableInputInterfaceMock ($ inputStream ), $ this ->createOutputInterface (), $ question ));
706
710
}
707
711
708
712
/**
0 commit comments