<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/tests, branch v2.1.1</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>test suite: fixed failure detection in the commandline-editing test cases</title>
<updated>2024-11-06T21:02:27+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-06T21:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6747f318f50760d7a3a773e894df3d3ed449e5d7'/>
<id>6747f318f50760d7a3a773e894df3d3ed449e5d7</id>
<content type='text'>
* The program exit code will usually not signal failures since they are caught earlier.
* Therefore, we always have to capture and check stderr.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The program exit code will usually not signal failures since they are caught earlier.
* Therefore, we always have to capture and check stderr.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed the Q-Reg spec machine used for implementing S^EGq$ (match one of characters in Q-Register)</title>
<updated>2024-11-06T20:50:09+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-06T20:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=5f141848b88237959bd01603b427b792828d73ad'/>
<id>5f141848b88237959bd01603b427b792828d73ad</id>
<content type='text'>
* It was initialized only once, so it could inherit the wrong local Q-Register table.
  A test case has been added for this particular bug.
* Also, if starting from the profile (batch mode), the state machine could be initialized
  without undo, which then later cause problems on rubout in interactive mode.
  For instance, if S^EG[a] fails and you would repeatedly type `]`, the Q-Reg name could
  grow indefinitely. There were probably other issues as well.
  Even crashes should have been possible, although I couldn't reproduce them.
* Since the state machine is required only for the pattern to regexp translation
  and is performed anew for every character in interactive mode,
  we now create a fresh state machine for every call and don't attempt
  any undo.
  There might be more efficient ways, like reusing the string building's
  Q-Reg parser state machine.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* It was initialized only once, so it could inherit the wrong local Q-Register table.
  A test case has been added for this particular bug.
* Also, if starting from the profile (batch mode), the state machine could be initialized
  without undo, which then later cause problems on rubout in interactive mode.
  For instance, if S^EG[a] fails and you would repeatedly type `]`, the Q-Reg name could
  grow indefinitely. There were probably other issues as well.
  Even crashes should have been possible, although I couldn't reproduce them.
* Since the state machine is required only for the pattern to regexp translation
  and is performed anew for every character in interactive mode,
  we now create a fresh state machine for every call and don't attempt
  any undo.
  There might be more efficient ways, like reusing the string building's
  Q-Reg parser state machine.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed possible crashes during --fake-cmdline</title>
<updated>2024-11-06T19:33:48+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-06T19:33:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9242405c8fc31b869fecfe096f29eb1a2ca75bda'/>
<id>9242405c8fc31b869fecfe096f29eb1a2ca75bda</id>
<content type='text'>
* A test case has been added, although it might have been accidental
  that on caused crashes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* A test case has been added, although it might have been accidental
  that on caused crashes.
</pre>
</div>
</content>
</entry>
<entry>
<title>monkey-test.apl: avoid some bogus failures due to insufficient handling of the pclose() return value</title>
<updated>2024-11-03T21:59:01+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-03T21:59:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=36c7526d60319289954bb0b49e9f4cb2c6dfe9da'/>
<id>36c7526d60319289954bb0b49e9f4cb2c6dfe9da</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed assertions in ^EGq search construct for Q-Registers with uninitialized string cells</title>
<updated>2024-11-03T19:36:36+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-03T13:43:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=4b05f261debf2320cd5b66df4a7becc36c4a8916'/>
<id>4b05f261debf2320cd5b66df4a7becc36c4a8916</id>
<content type='text'>
Found thanks to the "infinite monkey" test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found thanks to the "infinite monkey" test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added "infinite monkey"-style test (refs #26)</title>
<updated>2024-11-03T19:36:36+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-11-03T13:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=18bb9c0cd8e8b8f74347eef1a5afabe6233159d7'/>
<id>18bb9c0cd8e8b8f74347eef1a5afabe6233159d7</id>
<content type='text'>
Supposing that any monkey hitting keys on a typewriter, serving as a hardcopy
SciTECO terminal, will sooner or later trigger bugs and crash the application,
the new monkey-test.apl script emulates such a monkey.
In fact it's a bit more elaborate as the generated macro follows the frequency
distribution extracted from the corpus of SciTECO macro files (via monkey-parse.apl).
This it is hoped, increases the chance to get into "interesting" parser states.

This also adds a new hidden --sandbox argument, but it works only on FreeBSD (via Capsicum)
so far. In sandbox mode, we cannot open any file or execute external commands.
It is made sure, that SciTECO cannot assert in sandbox mode for scripts that would
run without --sandbox, since assertions are the kind of things we would like to detect.
SciTECO must be sandboxed during "infinite monkey" tests, so it cannot accidentally
do any harm on the system running the tests.
All macros in sandbox mode must currently be passed via --eval.
Alternatively, we could add a test compilation unit and generate the test data
directly in memory via C code.

The new scripts are written in GNU APL 1.9 and will probably work only under FreeBSD.
These scripts are not meant to be run by everyone.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Supposing that any monkey hitting keys on a typewriter, serving as a hardcopy
SciTECO terminal, will sooner or later trigger bugs and crash the application,
the new monkey-test.apl script emulates such a monkey.
In fact it's a bit more elaborate as the generated macro follows the frequency
distribution extracted from the corpus of SciTECO macro files (via monkey-parse.apl).
This it is hoped, increases the chance to get into "interesting" parser states.

This also adds a new hidden --sandbox argument, but it works only on FreeBSD (via Capsicum)
so far. In sandbox mode, we cannot open any file or execute external commands.
It is made sure, that SciTECO cannot assert in sandbox mode for scripts that would
run without --sandbox, since assertions are the kind of things we would like to detect.
SciTECO must be sandboxed during "infinite monkey" tests, so it cannot accidentally
do any harm on the system running the tests.
All macros in sandbox mode must currently be passed via --eval.
Alternatively, we could add a test compilation unit and generate the test data
directly in memory via C code.

The new scripts are written in GNU APL 1.9 and will probably work only under FreeBSD.
These scripts are not meant to be run by everyone.
</pre>
</div>
</content>
</entry>
<entry>
<title>testsuite: added --valgrind option for running SciTECO under Valgrind (memcheck)</title>
<updated>2024-10-30T11:04:54+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-10-30T01:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=7c55c0c00c761144e618868325f081771f6eb74e'/>
<id>7c55c0c00c761144e618868325f081771f6eb74e</id>
<content type='text'>
* Any memory error will let the test case fail with code 66.
* You can also call
  make check TESTSUITEFLAGS="--valgrind"
* There is no program test for Valgrind in configure.ac for the time being.
  `valgrind` must be in $PATH.
* All CI testsuite runs under Ubuntu are now with Valgrind.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Any memory error will let the test case fail with code 66.
* You can also call
  make check TESTSUITEFLAGS="--valgrind"
* There is no program test for Valgrind in configure.ac for the time being.
  `valgrind` must be in $PATH.
* All CI testsuite runs under Ubuntu are now with Valgrind.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed &lt;N&gt; (search all) crashes before invocations of &lt;S&gt; (closes #26)</title>
<updated>2024-10-29T13:08:45+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-10-29T13:08:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6d882a3fdd5b35181b301a2b1db32908c2b7953a'/>
<id>6d882a3fdd5b35181b301a2b1db32908c2b7953a</id>
<content type='text'>
* There was some boilerplate code missing in teco_state_search_all_initial(),
  that is present in teco_state_search_initial().
* Perhaps there should be a common function to avoid redundancies?
* This will also fix the initialization of the string argument codepage for &lt;N&gt;.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* There was some boilerplate code missing in teco_state_search_all_initial(),
  that is present in teco_state_search_initial().
* Perhaps there should be a common function to avoid redundancies?
* This will also fix the initialization of the string argument codepage for &lt;N&gt;.
</pre>
</div>
</content>
</entry>
<entry>
<title>added hidden --fake-cmdline parameter for testing command-line editing</title>
<updated>2024-10-28T14:38:02+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-10-28T14:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=0ce3b52f696d9fb07dded56400d4d3338074ea6c'/>
<id>0ce3b52f696d9fb07dded56400d4d3338074ea6c</id>
<content type='text'>
* Supports all immediate editing commands.
  Naturally it cannot emulate arbitrary key presses since there is no
  canonic ASCII-encoding of function keys.
  Key macros are not consequently also not testable.
  The --fake-cmdline parameter is instead treated very similar to
  a key macro expansion.
* Most importantly this allows adding test cases for rubout behavior
  and bugs that are quite common.
* Added regression test cases for the last two rubout bugs.
* It's not easy to pass control codes in command line arguments in
  a portable manner, so the test cases will often use { and }.
  Control codes could be used e.g. by defining variables like
  RUBOUT=`printf '\b'`
  and referencing them with ${RUBOUT}.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Supports all immediate editing commands.
  Naturally it cannot emulate arbitrary key presses since there is no
  canonic ASCII-encoding of function keys.
  Key macros are not consequently also not testable.
  The --fake-cmdline parameter is instead treated very similar to
  a key macro expansion.
* Most importantly this allows adding test cases for rubout behavior
  and bugs that are quite common.
* Added regression test cases for the last two rubout bugs.
* It's not easy to pass control codes in command line arguments in
  a portable manner, so the test cases will often use { and }.
  Control codes could be used e.g. by defining variables like
  RUBOUT=`printf '\b'`
  and referencing them with ${RUBOUT}.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed EOL conversion on UTF-8 texts</title>
<updated>2024-10-20T23:46:30+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-10-20T23:10:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=abfbeb17e56bd9abc275de0f7ace6c197e00e3bf'/>
<id>abfbeb17e56bd9abc275de0f7ace6c197e00e3bf</id>
<content type='text'>
* The old bug of saving gchar in gints, so teco_eol_reader_t::last_char could become negative.
* When converting from an UTF-8 text with CRLF linebreaks, we could have data loss and corruptions.
* On strings ending in UTF-8 characters, teco_eol_reader_t::offset would overflow, resulting
  in invalid reads and potentially insertion of data garbage.
  I observed this with G~ on Gtk.
* Test cased updated. Couldn't reproduce the bug with the test suite, though.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The old bug of saving gchar in gints, so teco_eol_reader_t::last_char could become negative.
* When converting from an UTF-8 text with CRLF linebreaks, we could have data loss and corruptions.
* On strings ending in UTF-8 characters, teco_eol_reader_t::offset would overflow, resulting
  in invalid reads and potentially insertion of data garbage.
  I observed this with G~ on Gtk.
* Test cased updated. Couldn't reproduce the bug with the test suite, though.
</pre>
</div>
</content>
</entry>
</feed>
