summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkbarkhon Variskhanov <akbarkhon.variskhanov@gmail.com>2022-08-27 23:06:37 +0500
committerChristian Hergert <christian@hergert.me>2022-08-28 20:46:53 +0000
commit4470d64266830bd2fb516d819723415e17a8648c (patch)
tree993bfad982194753d337124746b7e0bff49a56b5 /tests
parent21ec7d950dfdca67dc2afe9e1177171bd91d9862 (diff)
downloadgtksourceview-4470d64266830bd2fb516d819723415e17a8648c.tar.gz
tests: add example awk file
Changes to be committed: new file: tests/syntax-highlighting/file.awk
Diffstat (limited to 'tests')
-rw-r--r--tests/syntax-highlighting/file.awk21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/syntax-highlighting/file.awk b/tests/syntax-highlighting/file.awk
new file mode 100644
index 00000000..a786d454
--- /dev/null
+++ b/tests/syntax-highlighting/file.awk
@@ -0,0 +1,21 @@
+#!/usr/bin/awk -f
+# This is a comment line.
+
+# Special patterns:
+BEGIN
+END
+
+# Field variables:
+xxx$0xxx
+xx$NFxxx
+
+# String and numeric contansts:
+string = "Hello, World!"
+number = 42
+
+# Patterns:
+/\.'regexpr#"/ { print $0 }
+NR == 1, NR == 5 { printf("%s\n", $0) }
+
+# Statements:
+print string, number