a new line was not inserted at the end of output, causing diff to complain between linux and frebsd tested: linux , freebsd
added some test cases tested: windows, linux