Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transcripts do not fail on missing commands #1207

Closed
crotwell opened this issue Feb 23, 2022 · 1 comment
Closed

transcripts do not fail on missing commands #1207

crotwell opened this issue Feb 23, 2022 · 1 comment

Comments

@crotwell
Copy link

A non-existant command in a transcript should fail, but it passes even though cmd2 knows that "notacmd is not a recognized command, alias, or macro".

Create a transcript manually:

echo "(Cmd) notacmd" > test_notacmd.txt

Then using first_app example:

python first_app.py --test test_notacmd.txt

output is:

python first_app.py --test test_notacmd.txt
============================= cmd2 transcript test =============================
platform darwin -- Python 3.9.10, cmd2-2.3.3, readline-RlType.GNU
cwd: xxxxx/python-cmd2/cmd2/examples
cmd2 app: first_app.py
collected 1 transcript
notacmd is not a recognized command, alias, or macro
.
----------------------------------------------------------------------
Ran 1 test in 0.003s

OK
===================== 1 transcript passed in 0.003 seconds =====================
@kmvanbrunt
Copy link
Member

@crotwell I agree this issue is linked with #1185. We need to decide the best way to capture stderr.
I'm closing this issue so we can track all progress in the other ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants