diff options
author | Neil <nyamatongwe@gmail.com> | 2019-01-29 21:48:14 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-01-29 21:48:14 +1100 |
commit | 06a3fcba8e3282aa52f90cbf6f2d1aad947a600c (patch) | |
tree | 5f0de56a5400d6d5875a13515b5ea8b9133c3ad2 | |
parent | 16c6d58b93c8afa3391b63234ead3fc5318b2f48 (diff) | |
download | scintilla-mirror-06a3fcba8e3282aa52f90cbf6f2d1aad947a600c.tar.gz |
Add unit test for Tcl lexer.
-rw-r--r-- | test/examples/x.tcl | 8 | ||||
-rw-r--r-- | test/examples/x.tcl.styled | 8 | ||||
-rw-r--r-- | test/lexTests.py | 3 |
3 files changed, 19 insertions, 0 deletions
diff --git a/test/examples/x.tcl b/test/examples/x.tcl new file mode 100644 index 000000000..7553aca2d --- /dev/null +++ b/test/examples/x.tcl @@ -0,0 +1,8 @@ +# tcl tests + +#simple example + +proc Echo_Server {port} { + set s [socket -server EchoAccept $port] + vwait forever +} diff --git a/test/examples/x.tcl.styled b/test/examples/x.tcl.styled new file mode 100644 index 000000000..b9d419b41 --- /dev/null +++ b/test/examples/x.tcl.styled @@ -0,0 +1,8 @@ +{2}# tcl tests +{0} +{2}#simple example +{0} +{12}proc{0} {7}Echo_Server{0} {6}{{7}port{6}}{0} {6}{ +{0} {12}set{0} {7}s{0} {6}[{12}socket{0} {10}-server{0} {7}EchoAccept{0} {8}$port{6}] +{0} {12}vwait{0} {7}forever{0} +{6}} diff --git a/test/lexTests.py b/test/lexTests.py index 92042aa08..eb38b7af7 100644 --- a/test/lexTests.py +++ b/test/lexTests.py @@ -176,5 +176,8 @@ class TestLexers(unittest.TestCase): [b"keyword1", b"keyword2", b"", b"keyword4", b"keyword5", b"keyword6", b"keyword7"]) + def testTCL(self): + self.LexExample("x.tcl", b"tcl", [b"proc set socket vwait"]) + if __name__ == '__main__': Xite.main("lexTests") |