Files
asciinema/tests/integration.sh

33 lines
741 B
Bash
Raw Normal View History

#!/bin/bash
set -e
2016-07-05 16:20:10 +02:00
set -x
export ASCIINEMA_CONFIG_HOME=`mktemp -d 2>/dev/null || mktemp -d -t asciinema-config-home`
trap "echo rm -rf $ASCIINEMA_CONFIG_HOME" EXIT
2016-07-11 20:33:56 +02:00
function asciinema() {
python3 -m asciinema "$@"
}
2016-07-11 20:33:56 +02:00
asciinema -h
2016-07-11 20:33:56 +02:00
asciinema --version
2016-07-11 20:33:56 +02:00
asciinema auth
asciinema rec -c who __tmp.json
rm -f __tmp.json
2016-07-11 20:33:56 +02:00
bash -c "sleep 1; pkill -28 -n -f 'm asciinema'" &
asciinema rec -c 'bash -c "echo t3st; sleep 2; echo ok"' __tmp.json
rm -f __tmp.json
2016-07-11 20:33:56 +02:00
bash -c "sleep 1; pkill -n -f 'bash -c echo t3st'" &
asciinema rec -c 'bash -c "echo t3st; sleep 2; echo ok"' __tmp.json
rm -f __tmp.json
2016-07-11 20:33:56 +02:00
bash -c "sleep 1; pkill -9 -n -f 'bash -c echo t3st'" &
asciinema rec -c 'bash -c "echo t3st; sleep 2; echo ok"' __tmp.json
rm -f __tmp.json