(data)
| 202 | |
| 203 | // Helper for converting strings to buffers. |
| 204 | function buffer(data) { |
| 205 | if (data.constructor != Buffer) { |
| 206 | data = new Buffer(data, 'utf8'); |
| 207 | } |
| 208 | return data; |
| 209 | } |
| 210 | |
| 211 | // Set up fake stdin. |
| 212 | fake.stdin.write = function (data) { |