﻿using System;

namespace kgrep {
    public class WriteStdout : IHandleOutput {

        public void Write(string line) {
            if (line.EndsWith("\n")) 
               Console.Write(line);
            else
               Console.Write(line);
        }
            
        public string Close() {
            return "";
        }
    }
}

﻿using System;

namespace kgrep {
    public class WriteStdout : IHandleOutput {

        public void Write(string line) {
            Console.WriteLine(line);
        }
            
        public string Close() {
            return "";
        }
    }
}

Use newline when writing to stdout.
Use newline when writing to stdout.

The unit tests do not test stdout. Need a regression suite to test stdout to catch these conditions.
