From f1fec09d2d38f759d940dabbeab26a6ab7839c8b Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 6 Jul 2023 18:53:23 +0300 Subject: fixed ]$ and ]~ (pop from Q-Reg stack to special Q-Registers) * This was setting only the teco_doc but wasn't calling the necessary set_string() methods. * The idiom [$ FG...$ ]$ to change the working directory temporarily now works. * Similarily you can now write [~ ^U~...$ ]~ to change the clipboard temporarily. * Added test suite cases. The clipboard is not tested since it's not supported everywhere and would interfer with the host system. * Resolved lots of redundancies in qreg.c. The clipboard and workingdir Q-Regs have lots in common. This is now abstracted in the "external" Q-Reg base "class" (ie. via initializer TECO_INIT_QREG_EXTERNAL()). It uses vtable calls which is slightly more inefficient than per register implementations, but avoiding redundancies is probably more important. --- tests/testsuite.at | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/testsuite.at b/tests/testsuite.at index 20a72ca..e5b001a 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -63,6 +63,12 @@ AT_CHECK([$SCITECO -e '0U[[AB^Q@:>@(0/0)]]'], 0, ignore, ignore) # TODO: String building in Q-Register definitions AT_CLEANUP +AT_SETUP([Q-Register stack]) +AT_CHECK([$SCITECO -e "[[a 23Ub ]]b Qb\"N(0/0)'"], 0, ignore, ignore) +# FG will temporarily change the working directory to tests/testsuite.dir. +AT_CHECK([$SCITECO -e "[[\$ @FG'..' ]]\$ :Q\$-1Q\$-^^r\"=(0/0)'"], 0, ignore, ignore) +AT_CLEANUP + AT_SETUP([8-bit cleanlyness]) AT_CHECK([$SCITECO -e "0:@EUa/f^@^@/ :Qa-4\"N(0/0)' Ga Z= Z-4\"N(0/0)'"], 0, ignore, ignore) AT_CLEANUP -- cgit v1.2.3