added tests/gifs with vhs

This commit is contained in:
Leon van Kammen 2024-08-26 19:57:35 +00:00
parent 24e2c29a57
commit 04da7e8f88
5 changed files with 138 additions and 0 deletions

7
make
View File

@ -39,5 +39,12 @@ shell(){
$OCI exec -it xrsh /bin/sh -i -c 'source /mnt/profile && sh'
}
recordings(){
export PATH=$PATH:src/com/isoterminal/mnt
export BROWSER=0
test -z $1 && find src/tests/vhs/* | xargs -n1 vhs
test -z $1 || vhs $1
}
test -z $1 && install
test -z $1 || "$@"

View File

@ -14,6 +14,8 @@
nodejs_20
cosmopolitan
zip
vhs
ffmpeg_6-full
];

21
src/tests/vhs/alert.tape Normal file
View File

@ -0,0 +1,21 @@
# Where should we write the GIF?
Output ./../media/terminal/alert.gif
# Set up a 1200x600 terminal with 46px font.
Set Margin 0
Set FontSize 19
Set Width 500
Set Height 200
Set CursorBlink true
# Type a command in the terminal.
Type "alert hello"
# Pause for dramatic effect...
Sleep 1000ms
# Run the command by pressing enter.
Enter
# Admire the output for a bit.
Sleep 3s

View File

@ -0,0 +1,54 @@
# Where should we write the GIF?
Output ./../media/terminal/confirm.gif
# Set up a 1200x600 terminal with 46px font.
Set Margin 0
Set FontSize 19
Set Width 500
Set Height 200
Set CursorBlink true
# Type a command in the terminal.
Type "confirm 'do it?'"
# Pause for dramatic effect...
Sleep 1000ms
Enter
# Pause for dramatic effect...
Sleep 1000ms
Type "y"
Enter
# Admire the output for a bit.
Sleep 3s
# Type a command in the terminal.
Type "in=$(confirm 'do it?')"
Sleep 1000ms
Enter
Sleep 700ms
Type "y"
Sleep 1000ms
Enter
Sleep 1000ms
Type "echo $in"
Sleep 1000ms
Enter
Sleep 1000ms
Type "test $in = true && echo ♥"
Sleep 2000ms
Enter
# Admire the output for a bit.
Sleep 3s

54
src/tests/vhs/prompt.tape Normal file
View File

@ -0,0 +1,54 @@
# Where should we write the GIF?
Output ./../media/terminal/prompt.gif
# Set up a 1200x600 terminal with 46px font.
Set Margin 0
Set FontSize 19
Set Width 500
Set Height 200
Set CursorBlink true
# Type a command in the terminal.
Type "prompt 'whatsup'"
# Pause for dramatic effect...
Sleep 700ms
Enter
# Pause for dramatic effect...
Sleep 700ms
Type "FOSS"
Enter
# Admire the output for a bit.
Sleep 3s
# Type a command in the terminal.
Type "in=$(prompt 'whatsup')"
Sleep 1000ms
Enter
Sleep 700ms
Type "FOSS"
Sleep 1000ms
Enter
Sleep 1000ms
Type "echo $in"
Sleep 1000ms
Enter
Sleep 1000ms
Type "test $in = FOSS && echo ♥"
Sleep 2000ms
Enter
# Admire the output for a bit.
Sleep 3s