Commit 82d28c5
committed
test: make SessionOutput Promise tolerant
If a test case would use Promises for linesUntil, sometimes we would
emit lines events while there was no listener attached to it. This
commit changes SessionOutput to make it a little more resilient: now
line events will only be emitted when the SessionOutput is waiting. When
wait is called (via linesUntil, for example), it'll retrieve all lines
(via line events) on the buffer until it reaches a line matching the
regexp. If no lines match the regexp, we'll continue as before waiting
for data from lldb and buffering it.
PR-URL: #311
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent fd9d2b0 commit 82d28c5
1 file changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
51 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
| |||
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
| 140 | + | |
132 | 141 | | |
133 | 142 | | |
134 | 143 | | |
| |||
0 commit comments