diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2021-07-01 10:00:16 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2021-07-01 10:00:16 +0000 |
commit | bd758d6e00a86f4486d59fa299a637dfee2e5e32 (patch) | |
tree | ddf2707113152b8eae1cf462159401f980b3f625 | |
parent | 61c1e6725e4be6caba9c58460ec69b83874e5de8 (diff) |
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@
-rw-r--r-- | regress/bin/ksh/edit/emacs.sh | 13 |
1 files changed, 12 insertions, 1 deletions
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 <anton@openbsd.org> # Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -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" \ |