From 4f1b30ebe70a6475ffeca1ce2c0dc48c8e70a5f9 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 14 Dec 2019 08:17:00 +1100 Subject: Lexilla tests. --- lexilla/test/examples/cpp/SciTE.properties | 4 ++++ lexilla/test/examples/cpp/x.cxx | 16 ++++++++++++++++ lexilla/test/examples/cpp/x.cxx.styled | 16 ++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 lexilla/test/examples/cpp/SciTE.properties create mode 100644 lexilla/test/examples/cpp/x.cxx create mode 100644 lexilla/test/examples/cpp/x.cxx.styled (limited to 'lexilla/test/examples/cpp') diff --git a/lexilla/test/examples/cpp/SciTE.properties b/lexilla/test/examples/cpp/SciTE.properties new file mode 100644 index 000000000..ea4dd39b8 --- /dev/null +++ b/lexilla/test/examples/cpp/SciTE.properties @@ -0,0 +1,4 @@ +lexer.*.cxx=cpp +keywords.*.cxx=int +keywords2.*.cxx= +lexer.cpp.track.preprocessor=1 \ No newline at end of file diff --git a/lexilla/test/examples/cpp/x.cxx b/lexilla/test/examples/cpp/x.cxx new file mode 100644 index 000000000..384997072 --- /dev/null +++ b/lexilla/test/examples/cpp/x.cxx @@ -0,0 +1,16 @@ +// A demonstration program +#include +#if 0 /* */ +#define DUMMY() \ + if (1); +#endif + +#define M\ + +\ + +int main() { + double x[] = {3.14159,6.02e23,1.6e-19,1.0+1}; + int y[] = {75,0113,0x4b}; + printf("hello world %d %g\n", y[0], x[0]); +} diff --git a/lexilla/test/examples/cpp/x.cxx.styled b/lexilla/test/examples/cpp/x.cxx.styled new file mode 100644 index 000000000..b602717a5 --- /dev/null +++ b/lexilla/test/examples/cpp/x.cxx.styled @@ -0,0 +1,16 @@ +{2}// A demonstration program +{9}#include +#if 0 {23}/* */{9} +{73}#define DUMMY() \ + if (1); +{9}#endif +{0} +{9}#define M\ + +{0}\ + +{5}int{0} {11}main{10}(){0} {10}{{0} + {11}double{0} {11}x{10}[]{0} {10}={0} {10}{{4}3.14159{10},{4}6.02e23{10},{4}1.6e-19{10},{4}1.0{10}+{4}1{10}};{0} + {5}int{0} {11}y{10}[]{0} {10}={0} {10}{{4}75{10},{4}0113{10},{4}0x4b{10}};{0} + {11}printf{10}({6}"hello world %d %g\n"{10},{0} {11}y{10}[{4}0{10}],{0} {11}x{10}[{4}0{10}]);{0} +{10}}{0} -- cgit v1.2.3