summaryrefslogtreecommitdiff
path: root/test/unit/main/interactive_shell_black.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/main/interactive_shell_black.h')
-rw-r--r--test/unit/main/interactive_shell_black.h6
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 );
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback