summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-30 11:38:00 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-30 11:38:00 -0400
commit5a77702462a95de55cd70f5130e244db296abcd5 (patch)
tree2065cc6519b10c6708fd58bf0e214d8f9aa0b516 /tests
parentbc49e71c73eb3593705a7332bb5352825def88b3 (diff)
downloadcmd2-git-5a77702462a95de55cd70f5130e244db296abcd5.tar.gz
Fixed transcript testing bug where last command in transcript has no expected output
Also: - Added unit test for this specific case
Diffstat (limited to 'tests')
-rw-r--r--tests/test_transcript.py1
-rw-r--r--tests/transcripts/no_output.txt2
-rw-r--r--tests/transcripts/no_output_last.txt7
3 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index 9a63cf09..58ae16b4 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -103,6 +103,7 @@ def test_commands_at_invocation():
('multiline_no_regex.txt', False),
('multiline_regex.txt', False),
('no_output.txt', False),
+ ('no_output_last.txt', False),
('regex_set.txt', False),
('singleslash.txt', False),
('slashes_escaped.txt', False),
diff --git a/tests/transcripts/no_output.txt b/tests/transcripts/no_output.txt
index d1089a39..6b84e8e7 100644
--- a/tests/transcripts/no_output.txt
+++ b/tests/transcripts/no_output.txt
@@ -1,4 +1,4 @@
-# ensure the transcript can play a command with no output
+# ensure the transcript can play a command with no output from a command somewhere in the middle
(Cmd) say something
something
diff --git a/tests/transcripts/no_output_last.txt b/tests/transcripts/no_output_last.txt
new file mode 100644
index 00000000..c75d7e7f
--- /dev/null
+++ b/tests/transcripts/no_output_last.txt
@@ -0,0 +1,7 @@
+# ensure the transcript can play a command with no output from the last command
+
+(Cmd) say something
+something
+(Cmd) say something else
+something else
+(Cmd) nothing