From c293f725e55661ae690b52d5e8339e48b07a6a85 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 22 Dec 2024 18:08:14 +0300 Subject: fixed crashes while setting special Q-Registers with EU (string-building characters) * The teco_qreg_vtable_t::get_string() method should support returning the length optionally (may be NULL). This already worked with teco_doc_get_string(), even though it wasn't documented, and therefore didn't cause problems with regular Q-Registers. --- tests/testsuite.at | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/testsuite.at b/tests/testsuite.at index ffb3941..f17a711 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -244,6 +244,15 @@ AT_CHECK([$SCITECO -e '@I/^E@a/'], 0, ignore, ignore) AT_CHECK([$SCITECO -e '@I/^ENa/'], 0, ignore, ignore) AT_CLEANUP +AT_SETUP([Setting special Q-Registers with EU]) +# NOTE: The clipboard registers also suffered from this, but the test suite +# should not influence the clipboard (and it's not in Curses anyway). +# +# Should fail, but not crash +AT_CHECK([$SCITECO -e '@EU*""'], 1, ignore, ignore) +AT_CHECK([$SCITECO -e '@EU$"."'], 0, ignore, ignore) +AT_CLEANUP + AT_SETUP([Empty help topic]) AT_CHECK([$SCITECO -e '@?//'], 1, ignore, ignore) AT_CLEANUP -- cgit v1.2.3