diff options
Diffstat (limited to 'test/unit/main/interactive_shell_black.h')
-rw-r--r-- | test/unit/main/interactive_shell_black.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/main/interactive_shell_black.h b/test/unit/main/interactive_shell_black.h index f1fce3cb8..9ac81781c 100644 --- a/test/unit/main/interactive_shell_black.h +++ b/test/unit/main/interactive_shell_black.h @@ -47,8 +47,12 @@ private: void countCommands(InteractiveShell& shell, int minCommands, int maxCommands) { + Command* cmd; int n = 0; - while( n <= maxCommands && shell.readCommand() != NULL ) { ++n; } + while( n <= maxCommands && (cmd = shell.readCommand()) != NULL ) { + ++n; + delete cmd; + } TS_ASSERT( n <= maxCommands ); TS_ASSERT( n >= minCommands ); } |