Commit Graph

5 Commits

Author SHA1 Message Date
Matthew Hooker 104f5049a7 provisioner/shell: fix EOF detection
Fixes #507

The scanUnixLine function was erroneously returning empty lines when EOF
was reached.
This commit adds a test for the problem and changes the scanUnixLine
function to elide the trailing \n if no content was read.
2013-10-15 05:56:10 -07:00
Mitchell Hashimoto ff970483c4 provisioner/shell: add more tests for UnixReader 2013-10-04 10:47:28 -07:00
Matthew Hooker 0d1b936f69 Fix UnixReader panic on empty lines.
Added a test for the failure.

Most of the scanner code looks like it's a modified version of
bufio.ScanLines, so I changed it to use that but always add a line feed.
2013-10-01 09:06:01 +00:00
Mitchell Hashimoto 89d165aae7 provisioner/shell: add another UnixReader test for sanity 2013-09-30 11:39:24 -07:00
Mitchell Hashimoto abbac36796 provisioner/shell: convert windows line endings to Unix [GH-277] 2013-09-20 10:22:43 -07:00