aboutsummaryrefslogtreecommitdiffstats
path: root/test/xref.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-10-09 10:38:57 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-10-09 10:38:57 +0300
commitfb56b3b1ac97ff172d8e4b72f4b6aa90a9bfccd5 (patch)
treed8dcb9ab38ab9b409c6a2fc8707807eb2336ba9c /test/xref.awk
parentbff808d84a237098ef9b6f542f45a8442a0f536f (diff)
downloadegawk-fb56b3b1ac97ff172d8e4b72f4b6aa90a9bfccd5.tar.gz
egawk-fb56b3b1ac97ff172d8e4b72f4b6aa90a9bfccd5.tar.bz2
egawk-fb56b3b1ac97ff172d8e4b72f4b6aa90a9bfccd5.zip
Bug fix to test/xref.awk.
Diffstat (limited to 'test/xref.awk')
-rw-r--r--test/xref.awk8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/xref.awk b/test/xref.awk
index d23a0c8d..599aaa40 100644
--- a/test/xref.awk
+++ b/test/xref.awk
@@ -3,6 +3,8 @@
# 12/2010: Modified for gawk test suite to use a variable
# for the sort command and to use `sort -k1' instead of `sort +1'
+ # 10/2020: Bug fix applied to code.
+
BEGIN {
if (sortcmd == "") sortcmd = "sort" # "sort -k1"
@@ -121,15 +123,15 @@
else if ( line ~ /^}/ ) {
tok = "}"; line = substr(line,2); return 3 }
# change regexes to use posix character classes
- else if ( match(line,/^[[:alpha:]_][[:alnum:]]*\[/) ) {
+ else if ( match(line,/^[[:alpha:]_][[:alnum:]_]*\[/) ) {
tok = substr(line,1,RLENGTH-1)
line = substr(line,RLENGTH+1)
return 5 }
- else if ( match(line,/^[[:alpha:]_][[:alnum:]]*\(/) ) {
+ else if ( match(line,/^[[:alpha:]_][[:alnum:]_]*\(/) ) {
tok = substr(line,1,RLENGTH-1)
line = substr(line,RLENGTH+1)
if ( ! ( tok in keywords ) ) return 6 }
- else if ( match(line,/^[[:alpha:]_][[:alnum:]]*/) ) {
+ else if ( match(line,/^[[:alpha:]_][[:alnum:]_]*/) ) {
tok = substr(line,1,RLENGTH)
line = substr(line,RLENGTH+1)
if ( ! ( tok in keywords ) ) return 4 }