changeset 304:8c96f829ba1b

tweaking transcript test newlines (complete)
author catherine@dellzilla
date Wed, 27 Jan 2010 10:16:08 -0500
parents c3b9b2256dd6
children f84e8be8a792
files cmd2.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Wed Jan 27 10:05:11 2010 -0500
+++ b/cmd2.py	Wed Jan 27 10:16:08 2010 -0500
@@ -1237,17 +1237,17 @@
     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'%\