summaryrefslogtreecommitdiffstats
path: root/kate/tests/highlight.awk
blob: 47f10cfcbbb07ab80e8158f8782a3dcd91ba8b4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr
# AWK hl test

# BEGIN and END are also matched as patterns
BEGIN {
	p = 0;
}

/some pattern/ {
	p++;
}

# / inside brackets is not considered end of expression
# a loose division operator (/) is not mismatched as a pattern.
$1 =~ /[^abc/]def/ || b == 3 / 5 {

	gsub ( FILENAME );

}

# TODO and FIXME also work in comments in Awk.

# Also backslash in patterns works.
/\/usr\/bin\/awk/ { print "This is me"; }

END {
	print p;
}