File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 15
15
"react/event-loop" : " 0.3.*|0.4.*" ,
16
16
"react/stream" : " ^0.4.2" ,
17
17
"clue/utf8-react" : " ^0.1" ,
18
- "clue/term-react" : " ^0.1"
18
+ "clue/term-react" : " ^0.1.1 "
19
19
},
20
20
"autoload" : {
21
21
"psr-4" : { "Clue\\ React\\ Stdio\\ " : " src/" }
Original file line number Diff line number Diff line change @@ -198,11 +198,22 @@ public function testDataEventWillBeEmittedForCompleteLine()
198
198
$ this ->input ->emit ('data ' , array ("hello \n" ));
199
199
}
200
200
201
- public function testDataEventWillNotBeEmittedForIncompleteLine ()
201
+ public function testDataEventWillNotBeEmittedForIncompleteLineButWillStayInInputBuffer ()
202
202
{
203
203
$ this ->readline ->on ('data ' , $ this ->expectCallableNever ());
204
204
205
205
$ this ->input ->emit ('data ' , array ("hello " ));
206
+
207
+ $ this ->assertEquals ('hello ' , $ this ->readline ->getInput ());
208
+ }
209
+
210
+ public function testDataEventWillBeEmittedForCompleteLineAndRemainingWillStayInInputBuffer ()
211
+ {
212
+ $ this ->readline ->on ('data ' , $ this ->expectCallableOnceWith ('hello ' ));
213
+
214
+ $ this ->input ->emit ('data ' , array ("hello \nworld " ));
215
+
216
+ $ this ->assertEquals ('world ' , $ this ->readline ->getInput ());
206
217
}
207
218
208
219
public function testDataEventWillBeEmittedForEmptyLine ()
You can’t perform that action at this time.
0 commit comments