(data)
| 330 | |
| 331 | // Helper for converting strings to buffers. |
| 332 | function buffer(data) { |
| 333 | if (data.constructor != Buffer) { |
| 334 | data = new Buffer(data, 'utf8'); |
| 335 | } |
| 336 | return data; |
| 337 | } |
| 338 | |
| 339 | // Set up fake stdin. |
| 340 | fake.stdin.write = function (data) { |