diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-06-01 02:38:25 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-06-01 03:06:13 +0300 |
commit | 442268285a5f8b1d53052b6c7b0566d9200e71c7 (patch) | |
tree | 90fb62e9157445aebc2253ece0ec96b0934d1932 /tests | |
parent | 6e3da17a2fae11af9ae00d9b59bd0d752022e16b (diff) | |
download | sciteco-442268285a5f8b1d53052b6c7b0566d9200e71c7.tar.gz |
<nA> and <nQq> now return -1 in case the index n is out of range
* The old behavior of throwing an error was inherited from Video TECO.
* The command is now more similar to TECO-11.
* Since -1 is taken, invalid and incomplete UTF-8 byte sequences
are now reported as -2/-3.
I wasn't really able to provoke -3, though.
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 dddb1f0..fd93aa4 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -242,6 +242,11 @@ TE_CHECK([[@I/TEST/ @EW/юникод.txt/]], 0, ignore, ignore) AT_CHECK([[test -f юникод.txt]], 0, ignore, ignore) TE_CHECK([[^^ß-223"N(0/0)' 23Uъ Q[Ъ]-23"N(0/0)']], 0, ignore, ignore) TE_CHECK([[@O/метка/ !метка!]], 0, ignore, ignore) + +# Test the "error" return codes of <A>: +TE_CHECK([[0EE 255@I/A/J 65001EE 0A-(-2)"N(0/0)' 1A-^^A"N(0/0)' 2A-(-1)"N(0/0)']], 0, ignore, ignore) +# FIXME: Byte 128 should probably return -3 (incomplete sequence). +TE_CHECK([[@EQa// 0EE 128@I/A/J 65001EE 0Qa-(-2)"N(0/0)' 1Qa-^^A"N(0/0)' 2Qa-(-1)"N(0/0)']], 0, ignore, ignore) AT_CLEANUP AT_SETUP([Automatic EOL normalization]) |