From 06284b46d5987f19789d4089cf0dac86cec7f0e7 Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 1 Jul 2021 10:00:15 +0000 Subject: [PATCH] We already tested all corner cases for two-byte and three-byte UTF-8 sequences, but coverage of four-byte sequences was incomplete, which contributed to the recently fixed ksh(1) emacs.c bug not being found for some time. Consequently, add some tests covering + valid sequences starting with \0360, \0361, and \0363; + incomplete sequences starting with \0360 and \0361; + invalid (too low) sequences starting with \0360. OK anton@ --- regress/bin/ksh/edit/emacs.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/regress/bin/ksh/edit/emacs.sh b/regress/bin/ksh/edit/emacs.sh index 47f050b4aae..d1f5a41ca73 100644 --- a/regress/bin/ksh/edit/emacs.sh +++ b/regress/bin/ksh/edit/emacs.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: emacs.sh,v 1.12 2021/06/30 18:55:52 schwarze Exp $ +# $OpenBSD: emacs.sh,v 1.13 2021/07/01 10:00:15 schwarze Exp $ # # Copyright (c) 2017 Anton Lindqvist # Copyright (c) 2017 Ingo Schwarze @@ -42,6 +42,10 @@ testseq "z\0002\0355\0200\0200" " # z\b\0355\0200\0200z\b" testseq "z\0002\0355\0237\0277" " # z\b\0355\0237\0277z\b" testseq "z\0002\0356\0200\0200" " # z\b\0356\0200\0200z\b" testseq "z\0002\0357\0277\0277" " # z\b\0357\0277\0277z\b" +testseq "z\0002\0360\0220\0200\0200" " # z\b\0360\0220\0200\0200z\b" +testseq "z\0002\0360\0277\0277\0277" " # z\b\0360\0277\0277\0277z\b" +testseq "z\0002\0361\0200\0200\0200" " # z\b\0361\0200\0200\0200z\b" +testseq "z\0002\0363\0277\0277\0277" " # z\b\0363\0277\0277\0277z\b" testseq "z\0002\0364\0200\0200\0200" " # z\b\0364\0200\0200\0200z\b" testseq "z\0002\0364\0217\0277\0277" " # z\b\0364\0217\0277\0277z\b" @@ -58,6 +62,9 @@ testseq "z\0002\0355\0200\0006" " # z\b\0355\0200z\bz" testseq "z\0002\0355\0237\0006" " # z\b\0355\0237z\bz" testseq "z\0002\0356\0200\0006" " # z\b\0356\0200z\bz" testseq "z\0002\0357\0277\0006" " # z\b\0357\0277z\bz" +testseq "z\0002\0360\0220\0200\0006" " # z\b\0360\0220\0200z\bz" +testseq "z\0002\0360\0277\0277\0006" " # z\b\0360\0277\0277z\bz" +testseq "z\0002\0361\0200\0200\0006" " # z\b\0361\0200\0200z\bz" testseq "z\0002\0363\0200\0200\0006" " # z\b\0363\0200\0200z\bz" testseq "z\0002\0363\0277\0277\0006" " # z\b\0363\0277\0277z\bz" testseq "z\0002\0364\0200\0200\0006" " # z\b\0364\0200\0200z\bz" @@ -81,6 +88,10 @@ testseq "z\0002\0340\0202\0200" \ " # z\b\0340z\b\b\0340\0202z\b\b\0340\0202\0200z\b" testseq "z\0002\0340\0237\0277" \ " # z\b\0340z\b\b\0340\0237z\b\b\0340\0237\0277z\b" +testseq "z\0002\0360\0200\0200\0200" \ + " # z\b\0360z\b\b\0360\0200z\b\b\0360\0200\0200z\b\b\0360\0200\0200\0200z\b" +testseq "z\0002\0360\0217\0277\0277" \ + " # z\b\0360z\b\b\0360\0217z\b\b\0360\0217\0277z\b\b\0360\0217\0277\0277z\b" # insertion of surrogates and execessive code points testseq "z\0002\0355\0240\0200" \ -- 2.20.1