aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2023-07-06 18:53:23 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2023-07-06 18:53:23 +0300
commitf1fec09d2d38f759d940dabbeab26a6ab7839c8b (patch)
treefbf2b6e6e344464f31199a4fadbc830e0fee3ceb /tests
parent5546c501850b54c5a466a3448374d3b354952088 (diff)
downloadsciteco-f1fec09d2d38f759d940dabbeab26a6ab7839c8b.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at6
1 files changed, 6 insertions, 0 deletions
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