aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-03-07 22:06:58 +0200
committerArnold D. Robbins <arnold@skeeve.com>2020-03-07 22:06:58 +0200
commite26cf22ad5c7d772ecc0c195bfbc612f1bb1f5b6 (patch)
tree5549e020d1bcb65279781da93a55aade6524ab1b
parent2d817de9a9bf68a35a619dfbef702c6b4c2ec91e (diff)
downloadegawk-e26cf22ad5c7d772ecc0c195bfbc612f1bb1f5b6.tar.gz
egawk-e26cf22ad5c7d772ecc0c195bfbc612f1bb1f5b6.tar.bz2
egawk-e26cf22ad5c7d772ecc0c195bfbc612f1bb1f5b6.zip
Update to symtab11 test.
-rw-r--r--test/ChangeLog5
-rw-r--r--test/symtab11.awk4
-rw-r--r--test/symtab11.ok146
3 files changed, 81 insertions, 74 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index fddbe1e1..87b5cac1 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * symtab11.awk, symtab11.ok: Add value of array elements
+ to the output.
+
2020-03-06 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (profile5): Use AWKPATH so that out-of-tree
diff --git a/test/symtab11.awk b/test/symtab11.awk
index ec7f096b..2f666589 100644
--- a/test/symtab11.awk
+++ b/test/symtab11.awk
@@ -4,13 +4,13 @@ BEGIN {
printf("BEGIN -- Symtab is next\n") > "/dev/stdout"
for (i in SYMTAB) {
- printf "[%s]\n", i # else {printf("[%s]\t(%s)\n",i,SYMTAB[i]);}
+ printf "[%s] = %s\n", i, isarray(SYMTAB[i]) ? "<array>" : SYMTAB[i] # else {printf("[%s]\t(%s)\n",i,SYMTAB[i]);}
}
printf("BEGIN-- after Symtab loop\n") > "/dev/stdout" # never got here
printf("BEGIN -- Functab is next\n") > "/dev/stdout"
for (i in FUNCTAB) {
- printf "[%s]\n", i # else {printf("[%s]\t(%s)\n",i,FUNCTAB[i]);}
+ printf "[%s] = %s\n", i, FUNCTAB[i] # else {printf("[%s]\t(%s)\n",i,FUNCTAB[i]);}
}
printf("BEGIN-- after Functab loop\n") > "/dev/stdout" # never got here
exit
diff --git a/test/symtab11.ok b/test/symtab11.ok
index c5e3e0fc..29170949 100644
--- a/test/symtab11.ok
+++ b/test/symtab11.ok
@@ -1,76 +1,78 @@
BEGIN -- Symtab is next
-[i]
-[ROUNDMODE]
-[ORS]
-[OFS]
-[LINT]
-[FNR]
-[ERRNO]
-[NR]
-[IGNORECASE]
-[TEXTDOMAIN]
-[NF]
-[ARGIND]
-[ARGC]
-[FIELDWIDTHS]
-[CONVFMT]
-[SUBSEP]
-[PREC]
-[RS]
-[FPAT]
-[RT]
-[RLENGTH]
-[OFMT]
-[FS]
-[RSTART]
-[FILENAME]
-[BINMODE]
-[ARGV]
-[PROCINFO]
-[ENVIRON]
+[i] = i
+[ROUNDMODE] = N
+[ORS] =
+
+[OFS] =
+[LINT] = 0
+[FNR] = 0
+[ERRNO] =
+[NR] = 0
+[IGNORECASE] = 1
+[TEXTDOMAIN] = messages
+[NF] = 0
+[ARGIND] = 0
+[ARGC] = 1
+[FIELDWIDTHS] =
+[CONVFMT] = %.6g
+[SUBSEP] = 
+[PREC] = 53
+[RS] =
+
+[FPAT] = [^[:space:]]+
+[RT] =
+[RLENGTH] = 0
+[OFMT] = %.6g
+[FS] =
+[RSTART] = 0
+[FILENAME] =
+[BINMODE] = 0
+[ARGV] = <array>
+[PROCINFO] = <array>
+[ENVIRON] = <array>
BEGIN-- after Symtab loop
BEGIN -- Functab is next
-[rand]
-[dcgettext]
-[gsub]
-[match]
-[int]
-[log]
-[sprintf]
-[systime]
-[strftime]
-[length]
-[and]
-[srand]
-[asort]
-[atan2]
-[cos]
-[split]
-[compl]
-[bindtextdomain]
-[exp]
-[or]
-[fflush]
-[gensub]
-[dcngettext]
-[index]
-[system]
-[sqrt]
-[rshift]
-[tolower]
-[sin]
-[asorti]
-[typeof]
-[close]
-[mktime]
-[isarray]
-[patsplit]
-[sub]
-[substr]
-[xor]
-[lshift]
-[strtonum]
-[toupper]
-[bar]
-[foo]
+[rand] = rand
+[dcgettext] = dcgettext
+[gsub] = gsub
+[match] = match
+[int] = int
+[log] = log
+[sprintf] = sprintf
+[systime] = systime
+[strftime] = strftime
+[length] = length
+[and] = and
+[srand] = srand
+[asort] = asort
+[atan2] = atan2
+[cos] = cos
+[split] = split
+[compl] = compl
+[bindtextdomain] = bindtextdomain
+[exp] = exp
+[or] = or
+[fflush] = fflush
+[gensub] = gensub
+[dcngettext] = dcngettext
+[index] = index
+[system] = system
+[sqrt] = sqrt
+[rshift] = rshift
+[tolower] = tolower
+[sin] = sin
+[asorti] = asorti
+[typeof] = typeof
+[close] = close
+[mktime] = mktime
+[isarray] = isarray
+[patsplit] = patsplit
+[sub] = sub
+[substr] = substr
+[xor] = xor
+[lshift] = lshift
+[strtonum] = strtonum
+[toupper] = toupper
+[bar] = bar
+[foo] = foo
BEGIN-- after Functab loop