diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-07-25 01:41:37 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-07-26 00:42:15 +0300 |
commit | eee669a76b3c0b1928475d55d9e1333b3d15bb8c (patch) | |
tree | a56d85bf4e92c8049bd5e308cb13ee8e46de123c /tests/testsuite.at | |
parent | f7a11166d4a376867235bee213eeffddc05a8d78 (diff) | |
download | sciteco-eee669a76b3c0b1928475d55d9e1333b3d15bb8c.tar.gz |
implemented the <^A> command for printing arbitrary strings
* Greatly improved usability as a scripting language.
* The command is in DEC TECO, but in contrast to DEC TECO, we also
support string building constructs in ^A.
* Required some refactoring: As we want it to write everything verbatim
to stdout, the per-interface method is now teco_interface_msg_literal()
and it has to deal with unprintable characters.
When displaying in the UI, we use teco_curses_format_str() and TecoGtkLabel
functions/widgets to deal with possible control codes.
* Numbers printed with `=` have to be written with a trailing linefeed,
which would also be visible as a reverse "LF" in the UI.
Not sure whether this is acceptable - the alternative would be to strip
the strings before displaying them.
* Messages written to stdout are also auto-flushed at the moment.
In the future we might want to put flushing under control of the language.
Perhaps :^A could inhibit the flushing.
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r-- | tests/testsuite.at | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at index f7a8423..837fdef 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -183,6 +183,12 @@ TE_CHECK_CMDLINE([[2<255===>]], 0, stdout, ignore) AT_FAIL_IF([test `$GREP -v "^Info:" stdout | wc -l` -ne 4], 0, ignore, ignore) AT_CLEANUP +AT_SETUP([Printing strings]) +# FIXME: Test that the LF is missing at line end. +TE_CHECK([[@^A/TEST^JLine 2/]], 0, stdout, ignore) +AT_FAIL_IF([test `$GREP -v "^Info:" stdout | wc -l` -ne 2], 0, ignore, ignore) +AT_CLEANUP + AT_SETUP([Convert between line and glyph positions]) TE_CHECK([[@I/1^J2^J3/J 2^QC :^Q-3"N(0/0)']], 0, ignore, ignore) AT_CLEANUP |