summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorcatherine <catherine@dellzilla>2010-01-27 10:16:08 -0500
committercatherine <catherine@dellzilla>2010-01-27 10:16:08 -0500
commite4fc519d539b83871481787e7ff40cf477840058 (patch)
treee6a01580970ec652bd730d0cedc1d4eb2c0aba71 /cmd2.py
parent600b1d6776d7f0bf420112a87c719b010a117bbb (diff)
downloadcmd2-hg-e4fc519d539b83871481787e7ff40cf477840058.tar.gz
tweaking transcript test newlines (complete)
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd2.py b/cmd2.py
index 24911e9..16a9935 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1237,17 +1237,17 @@ class Cmd2TestCase(unittest.TestCase):
def _test_transcript(self, fname, transcript):
lineNum = 0
try:
- line = transcript.next().strip()
+ line = transcript.next()
while True:
while not line.startswith(self.cmdapp.prompt):
- line = transcript.next().strip()
+ line = transcript.next()
command = [line[len(self.cmdapp.prompt):]]
- line = transcript.next().strip()
+ line = transcript.next()
while line.startswith(self.cmdapp.continuation_prompt):
command.append(line[len(self.cmdapp.continuation_prompt):])
- line = transcript.next().strip()
+ line = transcript.next()
command = ''.join(command)
- self.cmdapp.onecmd(command)
+ self.cmdapp.onecmd(command.strip())
result = self.outputTrap.read().strip()
if line.startswith(self.cmdapp.prompt):
message = '\nFile %s, line %d\nCommand was:\n%s\nExpected: (nothing)\nGot:\n%s\n'%\