Add test for unicode combining fallback assert, issue 667

This commit is contained in:
John Hood
2015-10-03 15:35:54 -04:00
parent 307b241f0d
commit 14ae25ee2a
2 changed files with 42 additions and 0 deletions
+1
View File
@@ -10,6 +10,7 @@ displaytests = \
e2e-success.test \
e2e-failure.test \
emulation-back-tab.test \
unicode-combine-fallback-assert.test \
unicode-later-combining.test
check_PROGRAMS = ocb-aes encrypt-decrypt
+41
View File
@@ -0,0 +1,41 @@
#!/bin/sh
#
# This test is for Github issue 667
# https://github.com/mobile-shell/mosh/issues/667
# where mosh will assert when a combining character is printed on a
# just-cleared cell.
#
# It just sends the offending output to mosh and expects it to not die.
fail()
{
printf "$@" 2>&1
exit 99
}
PATH=$PATH:.:$srcdir
# Top-level wrapper.
if [ $# -eq 0 ]; then
e2e-test $0 baseline
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 '0\033[1J\xcc\xb4'
}
case $1 in
baseline)
baseline;;
*)
fail "unknown test argument %s\n" $1;;
esac