Test programmatically

So we don't have to use different files for each test.
why not `process.stdin.write()` and `process.stdin.end()`?