diff cmd2.py @ 345:6fe1e75e3a67

transcript test wasn't running pre and post cmd hooks
author catherine@Drou
date Tue, 16 Feb 2010 15:13:11 -0500
parents 787573d350c5
children 49dd1ce6cfd6
line wrap: on
line diff
--- a/cmd2.py	Tue Feb 16 14:05:25 2010 -0500
+++ b/cmd2.py	Tue Feb 16 15:13:11 2010 -0500
@@ -1473,8 +1473,11 @@
                 while line.startswith(self.cmdapp.continuation_prompt):
                     command.append(line[len(self.cmdapp.continuation_prompt):])
                     line = transcript.next()
-                command = ''.join(command)
-                self.cmdapp.onecmd(command)
+                command = ''.join(command)               
+                command = self.cmdapp.precmd(command)
+                stop = self.cmdapp.onecmd(command)
+                stop = self.cmdapp.postcmd(stop, command)
+                #TODO: should act on ``stop``
                 result = self.outputTrap.read()
                 if line.startswith(self.cmdapp.prompt):
                     message = '\nFile %s, line %d\nCommand was:\n%s\nExpected: (nothing)\nGot:\n%s\n'%\