diff options
author | Akbarkhon Variskhanov <akbarkhon.variskhanov@gmail.com> | 2022-08-27 23:06:37 +0500 |
---|---|---|
committer | Christian Hergert <christian@hergert.me> | 2022-08-28 20:46:53 +0000 |
commit | 4470d64266830bd2fb516d819723415e17a8648c (patch) | |
tree | 993bfad982194753d337124746b7e0bff49a56b5 /tests | |
parent | 21ec7d950dfdca67dc2afe9e1177171bd91d9862 (diff) | |
download | gtksourceview-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.awk | 21 |
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 |