Changeset View
Changeset View
Standalone View
Standalone View
autotests/input/highlight.awk
Show All 20 Lines | |||||
21 | # TODO and FIXME also work in comments in Awk. | 21 | # TODO and FIXME also work in comments in Awk. | ||
22 | 22 | | |||
23 | # Also backslash in patterns works. | 23 | # Also backslash in patterns works. | ||
24 | /\/usr\/bin\/awk/ { print "This is me"; } | 24 | /\/usr\/bin\/awk/ { print "This is me"; } | ||
25 | 25 | | |||
26 | END { | 26 | END { | ||
27 | print p; | 27 | print p; | ||
28 | } | 28 | } | ||
29 | | ||||
30 | function myfunc() | ||||
31 | { | ||||
32 | print 42 | ||||
33 | } | ||||
34 | | ||||
35 | /abc/,/a[b]c/{ | ||||
36 | # parameter with a regex | ||||
37 | if (match($0, /a/)) {} | ||||
38 | | ||||
39 | "x\ax\nx\ex\zx\023x\2x\xffx\xFf\xax\12x" | ||||
40 | | ||||
41 | a =~ /[[:alpha:]]/ | ||||
42 | a =~ /[xx[:alpha:]xx]/ | ||||
43 | a =~ /[a-z[:alpha:]xx-]/ | ||||
44 | a =~ /[]a]/ | ||||
45 | a =~ /[-a]/ | ||||
46 | a =~ /[^]a]/ | ||||
47 | a =~ /[^-a]/ | ||||
48 | a =~ /[a]a\/\n/ | ||||
49 | # incomplete regex | ||||
50 | a =~ /[xx[:alph | ||||
51 | a = 23.2 | ||||
52 | } |