summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2017-01-24 21:11:26 +0000
committerGitHub <noreply@github.com>2017-01-24 21:11:26 +0000
commita8bcee179405fd511feded697eb65ba986846afc (patch)
treee3a6bcdb0e72eecfd012ab8241faa7c59266b080 /tests/test_transcript.py
parent3cf60ac6d88fd15df40b5b6fe5a590d7276ef14d (diff)
parente23a0611eb7b1b7369ac6f65e89060808ab4aa57 (diff)
downloadcmd2-git-a8bcee179405fd511feded697eb65ba986846afc.tar.gz
Merge pull request #31 from tleonhardt/dev
Fixed a bug where user couldn't do "py run('script.py')" until after they did "py"
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r--tests/test_transcript.py36
1 files changed, 2 insertions, 34 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index dfb37da7..d7e40295 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -66,7 +66,6 @@ def _get_transcript_blocks(transcript):
yield cmd, _normalize(expected)
-@pytest.mark.xfail
def test_base_with_transcript(_cmdline_app):
app = _cmdline_app
transcript = """
@@ -99,20 +98,6 @@ goodnight, Gracie
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
-(Cmd) set
-abbrev: True
-case_insensitive: True
-colors: True
-continuation_prompt: >
-debug: False
-default_file_name: command.txt
-echo: False
-editor: /\w*/
-feedback_to_output: False
-maxrepeats: 3
-prompt: (Cmd)
-quiet: False
-timing: False
(Cmd) set maxrepeats 5
maxrepeats - was: 3
now: 5
@@ -132,37 +117,20 @@ say goodnight, Gracie
-------------------------[4]
say -ps --repeat=5 goodnight, Gracie
-------------------------[5]
-set
--------------------------[6]
set maxrepeats 5
--------------------------[7]
+-------------------------[6]
say -ps --repeat=5 goodnight, Gracie
(Cmd) run 4
-say -ps --repeat=5 goodnight, Gracie
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
-(Cmd) orate Four score and
-> seven releases ago
-> our BDFL
->
-Four score and
-seven releases ago
-our BDFL
-(Cmd) & look, a shortcut!
-look, a shortcut!
-(Cmd) say put this in a file > myfile.txt
-(Cmd) say < myfile.txt
-put this in a file
(Cmd) set prompt "---> "
prompt - was: (Cmd)
now: --->
----> say goodbye
-goodbye
"""
for cmd, expected in _get_transcript_blocks(transcript):
- out = run_cmd(app, 'help')
+ out = run_cmd(app, cmd)
assert out == expected