Commit 52d7815d authored by Tim Peters's avatar Tim Peters

Miranda newlines: if anything at all was written to stdout, supply a

newline at the end if there isn't one already.  Expected output has no
way to indicate that a trailing newline was not expected, and in the
interpreter shell *Python* supplies the trailing newline before printing
the next prompt.
parent c8e6dfa1
...@@ -444,7 +444,13 @@ class _SpoofOut: ...@@ -444,7 +444,13 @@ class _SpoofOut:
def write(self, s): def write(self, s):
self.buf.append(s) self.buf.append(s)
def get(self): def get(self):
return "".join(self.buf) guts = "".join(self.buf)
# If anything at all was written, make sure there's a trailing
# newline. There's no way for the expected output to indicate
# that a trailing newline is missing.
if guts and not guts.endswith("\n"):
guts = guts + "\n"
return guts
def clear(self): def clear(self):
self.buf = [] self.buf = []
def flush(self): def flush(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment