Small fix on testing files.

The default testing script fails due to simple mistakes.
* Missing `connect`.
* The number of lines printed to stdout is counted wrong.