diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 012ea4b..df126f0 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -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 diff --git a/src/tests/unicode-combine-fallback-assert.test b/src/tests/unicode-combine-fallback-assert.test new file mode 100755 index 0000000..5ed19c4 --- /dev/null +++ b/src/tests/unicode-combine-fallback-assert.test @@ -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