End to end test suite for Mosh sessions.

For original messy development history, see
https://github.com/cgull/mosh/tree/localhost
or
https://github.com/cgull/mosh/commit/e7feed48a4a271e2977f714f58acfa04cdaa5cca
This commit is contained in:
John Hood
2015-09-20 02:25:39 -04:00
parent 4a01dbdb06
commit 307b241f0d
13 changed files with 655 additions and 3 deletions
+50
View File
@@ -0,0 +1,50 @@
#!/bin/sh
#
# This test is for issue 539 on github.
#
fail()
{
printf "$@" 2>&1
exit 99
}
PATH=$PATH:.:$srcdir
# Top-level wrapper.
if [ $# -eq 0 ]; then
e2e-test $0 baseline post
exit
fi
# OK, we have arguments, we're one of the test hooks.
if [ $# -ne 1 ]; then
fail "bad arguments %s\n" "$@"
fi
baseline()
{
printf 'hello, wurld\033[Zo\n'
}
post()
{
if grep -q 'hello, world' $(basename $0).d/baseline.capture; then
exit 0
fi
if grep -q 'hello, wurldo' $(basename $0).d/baseline.capture; then
exit 1
fi
exit 99
}
case $1 in
baseline)
baseline;;
post)
post;;
*)
fail "unknown test argument %s\n" $1;;
esac