-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add asciinema_automation example and change default delaybeforesend v…
…alue
- Loading branch information
1 parent
c150fa8
commit 9875c8b
Showing
7 changed files
with
52 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#$ delay 10 | ||
|
||
cat ./hello_world.sh | ||
#$ expect \$ | ||
|
||
asciinema-automation --asciinema-arguments "--overwrite -c 'env -i PS1=\"$ \" bash --noprofile --norc'" ./hello_world.sh ./test.cast | ||
#$ expect \$ | ||
# change \$ to your prompt, or remove to just wait | ||
|
||
asciinema play ./test.cast | ||
#$ expect exit | ||
#$ expect \$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/reference_output/asciinema_automation_hello_world.cast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
$ cat ./hello_world.sh | ||
# mean of gaussian delay between key strokes, default to 50ms | ||
#$ delay 150 | ||
|
||
echo "Hello world" | ||
#$ expect \$ | ||
|
||
# wait instructions change the time between instructions, default to 80ms | ||
#$ wait 1000 | ||
|
||
echo "I now wait 1000ms" | ||
#$ expect \$ | ||
|
||
#$ delay 10 | ||
echo "I am writing with a 10ms delay" | ||
#$ expect \$ | ||
$ asciinema-automation --asciinema-arguments "--overwrite -c 'env -i PS1=\"$ \" | ||
bash --noprofile --norc'" ./hello_world.sh ./test.cast | ||
$ asciinema play ./test.cast | ||
$ echo "Hello world" | ||
Hello world | ||
$ echo "I now wait 1000ms" | ||
I now wait 1000ms | ||
$ echo "I am writing with a 10ms delay" | ||
I am writing with a 10ms delay | ||
$ exit | ||
$ exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
$ echo "Hello world" | ||
Hello world | ||
$ echo "I have waited 1000ms" | ||
I have waited 1000ms | ||
$ echo "I now wait 1000ms" | ||
I now wait 1000ms | ||
$ echo "I am writing with a 10ms delay" | ||
I am writing with a 10ms delay | ||
$ exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters