diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-18 12:32:16 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-18 12:32:16 +0200 |
commit | b7b98405089e69dfae0fc11e2a423860f50756e9 (patch) | |
tree | b789182370dc4493d040dafb0bc932f69fbbd3c4 /tests | |
parent | dc417a890ad48e28e573770f2ae980af002e93cb (diff) | |
download | sciteco-b7b98405089e69dfae0fc11e2a423860f50756e9.tar.gz |
check that local register is not edited at the end of macro calls
* This was unsafe and could easily result in crashes, since teco_qreg_current
would afterwards point to an already freed Q-Register.
* Since automatically editing another register or buffer is not easy to do right,
we throw an error instead.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testsuite.at | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at index e33a2c4..648e76c 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -79,6 +79,11 @@ AT_CHECK([$SCITECO -e "[[a 23Ub ]]b Qb\"N(0/0)'"], 0, ignore, ignore) AT_CHECK([$SCITECO -e "[[\$ @FG'..' ]]\$ :Q\$-1Q\$-^^r\"=(0/0)'"], 0, ignore, ignore) AT_CLEANUP +AT_SETUP([Editing local registers in macro calls]) +AT_CHECK([$SCITECO -e '@^Ua{@EQ.x//} :Ma @^U.x/FOO/'], 0, ignore, ignore) +AT_CHECK([$SCITECO -e '@^Ua{@EQ.x//} Ma @^U.x/FOO/'], 1, ignore, ignore) +AT_CLEANUP + AT_SETUP([8-bit cleanliness]) AT_CHECK([$SCITECO -e "0@I//J 0A\"N(0/0)' :@S/^@/\"F(0/0)'"], 0, ignore, ignore) AT_CHECK([$SCITECO -e "@EQa//0EE 1U*0EE 0:@EUa/f^@^@/ :Qa-4\"N(0/0)' Ga Z-4\"N(0/0)'"], 0, ignore, ignore) |