File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
test/API/commands/session/save Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -772,10 +772,12 @@ class CommandInterpreter : public Broadcaster,
772
772
773
773
StreamString m_transcript_stream;
774
774
775
- // / Contains a list of handled commands, output and error. Each element in
776
- // / the list is a dictionary with three keys: "command" (string), "output"
777
- // / (list of strings) and optionally "error" (list of strings). Each string
778
- // / in "output" and "error" is a line (without EOL characters).
775
+ // / Contains a list of handled commands and their details. Each element in
776
+ // / the list is a dictionary with the following keys/values:
777
+ // / - "command" (string): The command that was executed.
778
+ // / - "output" (string): The output of the command. Empty ("") if no output.
779
+ // / - "error" (string): The error of the command. Empty ("") if no error.
780
+ // / - "seconds" (float): The time it took to execute the command.
779
781
StructuredData::Array m_transcript;
780
782
};
781
783
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ def test_session_save(self):
25
25
raw = ""
26
26
interpreter = self .dbg .GetCommandInterpreter ()
27
27
28
+ # Make sure "save-transcript" is on, so that all the following setings
29
+ # and commands are saved into the trasncript. Note that this cannot be
30
+ # a part of the `settings`, because this command itself won't be saved
31
+ # into the transcript.
32
+ self .runCmd ("settings set interpreter.save-transcript true" )
33
+
28
34
settings = [
29
35
"settings set interpreter.echo-commands true" ,
30
36
"settings set interpreter.echo-comment-commands true" ,
@@ -95,6 +101,12 @@ def test_session_save_on_quit(self):
95
101
raw = ""
96
102
interpreter = self .dbg .GetCommandInterpreter ()
97
103
104
+ # Make sure "save-transcript" is on, so that all the following setings
105
+ # and commands are saved into the trasncript. Note that this cannot be
106
+ # a part of the `settings`, because this command itself won't be saved
107
+ # into the transcript.
108
+ self .runCmd ("settings set interpreter.save-transcript true" )
109
+
98
110
td = tempfile .TemporaryDirectory ()
99
111
100
112
settings = [
You can’t perform that action at this time.
0 commit comments