aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexilla/test
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-04-13 08:06:56 +1000
committerNeil <nyamatongwe@gmail.com>2020-04-13 08:06:56 +1000
commit98fba9dcdd0b734e0788de4d731bd3dcf5ee9fc0 (patch)
treec3a81410095a73a45756f6b26f6b7ea3a24e797e /lexilla/test
parent1769cc3907d3f06254053ab76bd9e827417f07cf (diff)
downloadscintilla-mirror-98fba9dcdd0b734e0788de4d731bd3dcf5ee9fc0.tar.gz
Hide implementation of EscapeSequence and use const. Add tests for escape
sequences.
Diffstat (limited to 'lexilla/test')
-rw-r--r--lexilla/test/examples/cpp/x.cxx7
-rw-r--r--lexilla/test/examples/cpp/x.cxx.styled7
2 files changed, 14 insertions, 0 deletions
diff --git a/lexilla/test/examples/cpp/x.cxx b/lexilla/test/examples/cpp/x.cxx
index 8e42167b2..c1f052882 100644
--- a/lexilla/test/examples/cpp/x.cxx
+++ b/lexilla/test/examples/cpp/x.cxx
@@ -17,4 +17,11 @@ int main() {
// JavaScript regular expression (14) tests
let a = /a/;
let b = /[a-z]+/gi;
+
+ // Escape sequence (27) tests
+ printf("\'\"\?\\\a\b\f\n\r\t\v \P");
+ printf("\0a \013a \019");
+ printf("\x013ac \xdz");
+ printf("\ua34df \uz");
+ printf("\Ua34df7833 \Uz");
}
diff --git a/lexilla/test/examples/cpp/x.cxx.styled b/lexilla/test/examples/cpp/x.cxx.styled
index c269ed1b4..e4241eba2 100644
--- a/lexilla/test/examples/cpp/x.cxx.styled
+++ b/lexilla/test/examples/cpp/x.cxx.styled
@@ -17,4 +17,11 @@
{2}// JavaScript regular expression (14) tests
{0} {5}let{0} {11}a{0} {10}={0} {14}/a/{10};{0}
{5}let{0} {11}b{0} {10}={0} {14}/[a-z]+/gi{10};{0}
+
+ {2}// Escape sequence (27) tests
+{0} {11}printf{10}({6}"{27}\'\"\?\\\a\b\f\n\r\t\v{6} {27}\P{6}"{10});{0}
+ {11}printf{10}({6}"{27}\0{6}a {27}\013{6}a {27}\01{6}9"{10});{0}
+ {11}printf{10}({6}"{27}\x013a{6}c {27}\xd{6}z"{10});{0}
+ {11}printf{10}({6}"{27}\ua34d{6}f {27}\u{6}z"{10});{0}
+ {11}printf{10}({6}"{27}\Ua34df783{6}3 {27}\U{6}z"{10});{0}
{10}}{0}