diff options
Diffstat (limited to 'tests/transcripts')
-rw-r--r-- | tests/transcripts/multiline_transcript.txt | 10 | ||||
-rw-r--r-- | tests/transcripts/transcript.txt | 57 | ||||
-rw-r--r-- | tests/transcripts/transcript_regex.txt | 17 |
3 files changed, 84 insertions, 0 deletions
diff --git a/tests/transcripts/multiline_transcript.txt b/tests/transcripts/multiline_transcript.txt new file mode 100644 index 00000000..5fe9122c --- /dev/null +++ b/tests/transcripts/multiline_transcript.txt @@ -0,0 +1,10 @@ +# cmd2 will skip any lines +# which occur before a valid +# command prompt + +(Cmd) orate This is a test +> of the +> emergency broadcast system +This is a test +of the +emergency broadcast system diff --git a/tests/transcripts/transcript.txt b/tests/transcripts/transcript.txt new file mode 100644 index 00000000..e95b9b39 --- /dev/null +++ b/tests/transcripts/transcript.txt @@ -0,0 +1,57 @@ +(Cmd) help + +Documented commands (type help <topic>): +======================================== +_relative_load edit history orate pyscript run say shell show +cmdenvironment help load py quit save set shortcuts speak + +(Cmd) help say +Repeats what you tell me to. +Usage: speak [options] (text to say) + +Options: + -h, --help show this help message and exit + -p, --piglatin atinLay + -s, --shout N00B EMULATION MODE + -r REPEAT, --repeat=REPEAT + output [n] times + +(Cmd) say goodnight, Gracie +goodnight, Gracie +(Cmd) say -ps --repeat=5 goodnight, Gracie +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +(Cmd) set maxrepeats 5 +maxrepeats - was: 3 +now: 5 +(Cmd) say -ps --repeat=5 goodnight, Gracie +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +OODNIGHT, GRACIEGAY +(Cmd) hi +-------------------------[1] +help +-------------------------[2] +help say +-------------------------[3] +say goodnight, Gracie +-------------------------[4] +say -ps --repeat=5 goodnight, Gracie +-------------------------[5] +set maxrepeats 5 +-------------------------[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) set prompt "---> " +prompt - was: (Cmd) +now: ---> diff --git a/tests/transcripts/transcript_regex.txt b/tests/transcripts/transcript_regex.txt new file mode 100644 index 00000000..a310224b --- /dev/null +++ b/tests/transcripts/transcript_regex.txt @@ -0,0 +1,17 @@ +# Run this transcript with "python example.py -t transcript_regex.txt" +# The regex for colors is because no color on Windows. +# The regex for editor will match whatever program you use. +(Cmd) set +abbrev: True +autorun_on_edit: False +colors: /(True|False)/ +continuation_prompt: > +debug: False +echo: False +editor: /.*/ +feedback_to_output: False +locals_in_py: True +maxrepeats: 3 +prompt: (Cmd) +quiet: False +timing: False |