[gtksourceview] cmake.lang: add a test file
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] cmake.lang: add a test file
- Date: Thu, 16 Nov 2017 14:49:37 +0000 (UTC)
commit 9479b44ed56e6e8f4b7f0ca7bb8626d321d083cf
Author: Роман Донченко <dpb corrigendum ru>
Date: Sun Nov 12 22:25:36 2017 +0300
cmake.lang: add a test file
https://bugzilla.gnome.org/show_bug.cgi?id=790345
tests/syntax-highlighting/file.cmake | 39 ++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/tests/syntax-highlighting/file.cmake b/tests/syntax-highlighting/file.cmake
new file mode 100644
index 0000000..0ecbacc
--- /dev/null
+++ b/tests/syntax-highlighting/file.cmake
@@ -0,0 +1,39 @@
+#[=[
+ This is a bracket comment.
+ TODO markers are recognized here.
+]=]
+
+# This is a line comment.
+# TODO markers are recognized here, too.
+
+set(words
+ These are unquoted arguments.
+ They can include variable references: ${var}, $ENV{var},
+ and escape sequences: \n\".)
+
+message("This is an unquoted argument.
+ It can also include variable references: ${APPLE}, $ENV{CC},
+ and escape sequences: \t\ \\.
+ In addition, line continuations: \
+ are allowed.")
+
+message("Variable references can nest: ${x$ENV{y${z}w}v}")
+
+message([==[
+ This is a bracket argument.
+ Variable references (${x}) or escape sequences (\n)
+ are not processed here.
+]==])
+
+# These are examples of legacy unquoted argument syntax
+# from the cmake-language manual page.
+set(arg_examples
+ -Da="b c" -Da=$(v) a" "b"c"d # legacy
+ "-Da=\"b c\"" "-Da=$(v)" "a\" \"b\"c\"d" # quoted equivalents
+)
+unset(arg_examples)
+
+# Control construct example.
+if(a EQUAL 5 AND (s STREQUAL "${x}" OR s MATCHES [[\*]]))
+endif()
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]