xite is a small suite of unit tests for Scintilla. It is written in
Python 2.5 on Windows. Python 2.5 is needed as the tests use ctypes
and the with statement. In the future this will go in the repository
but for now it can be downloaded from
http://scintilla.sourceforge.net/xite.zip
This should be unzipped as a peer directory of Scintilla (so that
xite can use ../scintilla/include for the Scintilla.iface file and
code to load it) and a copy of SciLexer.dll placed in the xite
directory. There are some basic tests in simpleTests.py which can be
run with
python simpleTests.py
Some lexers (cpp, python, hypertext, vb) have tests in lexTests.py
which can be run with
python lexTests.py
The lexer tests depend on an 'examples' subdirectory containing
example texts (<name>) along with lexed versions (<name>.styled) which
use {number} to indicate where the lexical state changes. If a test
produces a different lexing this is written to <name>.new so that they
can be compared. The lexer tests mostly check whether the output of a
lexer has changed so can be used to detect unexpected side effects of
changes. Where a deliberate change is made then the <name>.new should
be checked for correctness and if OK it becomes <name>.styled.
There is also a simple editor that can be invoked with
python xite.py
This code shows how a malleable language like Python can use the
Scintilla.iface file to produce a callable interface in the Scintilla
class inside XiteWin.py.
Neil
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest